Amazon Comprehend Medical (NLP)

This component analyzes text and extracts detected languages, entities, key phrases and sentiments.

This component uses the Amazon Comprehend NLP service.

How to Add the Amazon Comprehend Medical Component

  1. Navigate to the AutoClassifier Pipelines component page.
  2. Click New Component and select Amazon Comprehend Medical from the component list:
  3. Name your new Amazon Comprehend Medical component and click Add
  4. Click Apply to save your changes.
  5. Ensure your new Amazon Comprehend Medical component is placed in the list of existing pipeline stages.

How to Configure the Amazon Comprehend Medical Component

To configure your Amazon Comprehend Medical component, select it from the components list and complete the following fields in the Configuration section:

Credentials can be provided one of two ways:

  • Enter AWS Credentials file and AWS Region

  • Directly provide API Key and API secret

  1. If you check Use Credentials file to use a credentials file, specify the following:
    1. Credentials file location: Enter the location of AWS Credential file. For example, C:\Users\Luca\Desktop\credentials.txt

      Example AWS Credentials File

      Copy
      [{profilename}]
      aws_access_key_id = {accessKey}
      aws_secret_access_key = {secretKey}
    2. Credentials Profile Name: Enter AWS Profile Name for the Credentials File.
  2. If you did not check Use Credentials file to use a credentials file, specify the following:
    1. Api Key: Setup your Amazon Comprehend instance, obtain an API key, and enter your key into this field.
    2. Api Secret: Enter the API Secret of your Amazon Comprehend instance.
  3. Amazon Web Service Region: Select the Region of your Amazon Web Service from the drop-down list. The supported Regions for Amazon Comprehend Medical are documented here
  4. Input Property: Enter the input property configured for entity extraction. The default value for this field is 'body'.
  5. Include Entities: Enable this checkbox to include extraction of Medical Entities
  6. Roll Up Category Entities: Enabled this checkbox to include "All" category entities into a single property. The output property for this is 'AmazonMedicalEntities'.
  7. Entities score threshold: Enter a value between 0 and 1. Entities below the threshold score will not be reported.
  8. Maximum Entities: Enter the maximum number of entities to return. The entities will be returned and trimmed by score.
  9. Include RxNorm Concepts: Enable this checkbox to include extraction of Rx Norm Inferred Concepts
  10. RxNorm Concept score threshold: Enter a value between 0 and 1. Concepts below the threshold score will not be reported.
  11. RxNorm Maximum Concepts: Enter the maximum number of concepts to return. The concepts will be returned and trimmed by score.
  12. Include LCD CM Concepts: Enable this checkbox to include extraction of LCD CM Inferred Concepts
  13. LCD CM Concept score threshold: Enter a value between 0 and 1. Concepts below the threshold score will not be reported.
  14. LCD CM Maximum Concepts: Enter the maximum number of concepts to return. The concepts will be returned and trimmed by score.
  15. Send raw response as metadata: Enable this checkbox to return the raw data returned by Amazon Web Service.

Output Properties

Property

Type

AmazonMedicalEntities

Text – Multi

AmazonMedicalResponse Text
AmazonMedicalSerializedEntitiesJson
  • Serializied value of top important entities.

  • Note this is useful for summary generation.

Medical Entities

Current medical entities in your text. It detects entities in the following categories and how they are translated to Output Properties (in table above).

Amazon Category

Property

Type

ANATOMY

AmazonMedicalANATOMY

Text – Multi

MEDICAL_CONDITION

AmazonMedicalMEDICALCONDITION

Text – Multi

MEDICATION AmazonMedicalMEDICATION Text – Multi
PROTECTED_HEALTH_INFORMATION AmazonMedicalPROTECTEDHEALTHINFORMATION Text – Multi
TEST_TREATMENT_PROCEDURE AmazonMedicalTESTTREATMENTPROCEDURE Text – Multi

Amazon Types Examples

Amazon Type

Property

Type

AGE

AmazonMedicalAGE

Text – Multi

PROFESSION

AmazonMedicalPROFESSION

Text – Multi

DXNAME AmazonMedicalDXNAME Text – Multi
GENERICNAME AmazonMedicalGENERICNAME Text – Multi
BRANDNAME AmazonMedicalBRANDNAME Text – Multi

Text to Output Example

Passing the following text to Amazon Comprehend Medical would produce the corresponding output: