ComprehendMedical

Table of Contents

Client

class ComprehendMedical.Client

A low-level client representing AWS Comprehend Medical (ComprehendMedical)

Comprehend Medical; extracts structured information from unstructured clinical text. Use these actions to gain insight in your documents.

import boto3

client = boto3.client('comprehendmedical')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
describe_entities_detection_v2_job(**kwargs)

Gets the properties associated with a medical entities detection job. Use this operation to get the status of a detection job.

See also: AWS API Documentation

Request Syntax

response = client.describe_entities_detection_v2_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier that Comprehend Medical; generated for the job. The StartEntitiesDetectionV2Job operation returns this identifier in its response.

Return type
dict
Returns
Response Syntax
{
    'ComprehendMedicalAsyncJobProperties': {
        'JobId': 'string',
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'Message': 'string',
        'SubmitTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ExpirationTime': datetime(2015, 1, 1),
        'InputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'OutputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'LanguageCode': 'en',
        'DataAccessRoleArn': 'string',
        'ManifestFilePath': 'string',
        'KMSKey': 'string',
        'ModelVersion': 'string'
    }
}

Response Structure

  • (dict) --
    • ComprehendMedicalAsyncJobProperties (dict) --

      An object that contains the properties associated with a detection job.

      • JobId (string) --

        The identifier assigned to the detection job.

      • JobName (string) --

        The name that you assigned to the detection job.

      • JobStatus (string) --

        The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

      • Message (string) --

        A description of the status of a job.

      • SubmitTime (datetime) --

        The time that the detection job was submitted for processing.

      • EndTime (datetime) --

        The time that the detection job completed.

      • ExpirationTime (datetime) --

        The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

      • InputDataConfig (dict) --

        The input data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

          Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

        • S3Key (string) --

          The path to the input data files in the S3 bucket.

      • OutputDataConfig (dict) --

        The output data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

        • S3Key (string) --

          The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

      • LanguageCode (string) --

        The language code of the input documents.

      • DataAccessRoleArn (string) --

        The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

      • ManifestFilePath (string) --

        The path to the file that describes the results of a batch job.

      • KMSKey (string) --

        The AWS Key Management Service key, if any, used to encrypt the output files.

      • ModelVersion (string) --

        The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
describe_icd10_cm_inference_job(**kwargs)

Gets the properties associated with an InferICD10CM job. Use this operation to get the status of an inference job.

See also: AWS API Documentation

Request Syntax

response = client.describe_icd10_cm_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier that Amazon Comprehend Medical generated for the job. The StartICD10CMInferenceJob operation returns this identifier in its response.

Return type
dict
Returns
Response Syntax
{
    'ComprehendMedicalAsyncJobProperties': {
        'JobId': 'string',
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'Message': 'string',
        'SubmitTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ExpirationTime': datetime(2015, 1, 1),
        'InputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'OutputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'LanguageCode': 'en',
        'DataAccessRoleArn': 'string',
        'ManifestFilePath': 'string',
        'KMSKey': 'string',
        'ModelVersion': 'string'
    }
}

Response Structure

  • (dict) --
    • ComprehendMedicalAsyncJobProperties (dict) --

      An object that contains the properties associated with a detection job.

      • JobId (string) --

        The identifier assigned to the detection job.

      • JobName (string) --

        The name that you assigned to the detection job.

      • JobStatus (string) --

        The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

      • Message (string) --

        A description of the status of a job.

      • SubmitTime (datetime) --

        The time that the detection job was submitted for processing.

      • EndTime (datetime) --

        The time that the detection job completed.

      • ExpirationTime (datetime) --

        The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

      • InputDataConfig (dict) --

        The input data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

          Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

        • S3Key (string) --

          The path to the input data files in the S3 bucket.

      • OutputDataConfig (dict) --

        The output data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

        • S3Key (string) --

          The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

      • LanguageCode (string) --

        The language code of the input documents.

      • DataAccessRoleArn (string) --

        The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

      • ManifestFilePath (string) --

        The path to the file that describes the results of a batch job.

      • KMSKey (string) --

        The AWS Key Management Service key, if any, used to encrypt the output files.

      • ModelVersion (string) --

        The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
describe_phi_detection_job(**kwargs)

Gets the properties associated with a protected health information (PHI) detection job. Use this operation to get the status of a detection job.

See also: AWS API Documentation

Request Syntax

response = client.describe_phi_detection_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier that Comprehend Medical; generated for the job. The StartPHIDetectionJob operation returns this identifier in its response.

Return type
dict
Returns
Response Syntax
{
    'ComprehendMedicalAsyncJobProperties': {
        'JobId': 'string',
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'Message': 'string',
        'SubmitTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ExpirationTime': datetime(2015, 1, 1),
        'InputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'OutputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'LanguageCode': 'en',
        'DataAccessRoleArn': 'string',
        'ManifestFilePath': 'string',
        'KMSKey': 'string',
        'ModelVersion': 'string'
    }
}

Response Structure

  • (dict) --
    • ComprehendMedicalAsyncJobProperties (dict) --

      An object that contains the properties associated with a detection job.

      • JobId (string) --

        The identifier assigned to the detection job.

      • JobName (string) --

        The name that you assigned to the detection job.

      • JobStatus (string) --

        The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

      • Message (string) --

        A description of the status of a job.

      • SubmitTime (datetime) --

        The time that the detection job was submitted for processing.

      • EndTime (datetime) --

        The time that the detection job completed.

      • ExpirationTime (datetime) --

        The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

      • InputDataConfig (dict) --

        The input data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

          Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

        • S3Key (string) --

          The path to the input data files in the S3 bucket.

      • OutputDataConfig (dict) --

        The output data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

        • S3Key (string) --

          The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

      • LanguageCode (string) --

        The language code of the input documents.

      • DataAccessRoleArn (string) --

        The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

      • ManifestFilePath (string) --

        The path to the file that describes the results of a batch job.

      • KMSKey (string) --

        The AWS Key Management Service key, if any, used to encrypt the output files.

      • ModelVersion (string) --

        The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
describe_rx_norm_inference_job(**kwargs)

Gets the properties associated with an InferRxNorm job. Use this operation to get the status of an inference job.

See also: AWS API Documentation

Request Syntax

response = client.describe_rx_norm_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier that Amazon Comprehend Medical generated for the job. The StartRxNormInferenceJob operation returns this identifier in its response.

Return type
dict
Returns
Response Syntax
{
    'ComprehendMedicalAsyncJobProperties': {
        'JobId': 'string',
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'Message': 'string',
        'SubmitTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ExpirationTime': datetime(2015, 1, 1),
        'InputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'OutputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'LanguageCode': 'en',
        'DataAccessRoleArn': 'string',
        'ManifestFilePath': 'string',
        'KMSKey': 'string',
        'ModelVersion': 'string'
    }
}

Response Structure

  • (dict) --
    • ComprehendMedicalAsyncJobProperties (dict) --

      An object that contains the properties associated with a detection job.

      • JobId (string) --

        The identifier assigned to the detection job.

      • JobName (string) --

        The name that you assigned to the detection job.

      • JobStatus (string) --

        The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

      • Message (string) --

        A description of the status of a job.

      • SubmitTime (datetime) --

        The time that the detection job was submitted for processing.

      • EndTime (datetime) --

        The time that the detection job completed.

      • ExpirationTime (datetime) --

        The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

      • InputDataConfig (dict) --

        The input data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

          Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

        • S3Key (string) --

          The path to the input data files in the S3 bucket.

      • OutputDataConfig (dict) --

        The output data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

        • S3Key (string) --

          The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

      • LanguageCode (string) --

        The language code of the input documents.

      • DataAccessRoleArn (string) --

        The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

      • ManifestFilePath (string) --

        The path to the file that describes the results of a batch job.

      • KMSKey (string) --

        The AWS Key Management Service key, if any, used to encrypt the output files.

      • ModelVersion (string) --

        The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
describe_snomedct_inference_job(**kwargs)

Gets the properties associated with an InferSNOMEDCT job. Use this operation to get the status of an inference job.

See also: AWS API Documentation

Request Syntax

response = client.describe_snomedct_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier that Amazon Comprehend Medical generated for the job. The StartSNOMEDCTInferenceJob operation returns this identifier in its response.

Return type
dict
Returns
Response Syntax
{
    'ComprehendMedicalAsyncJobProperties': {
        'JobId': 'string',
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'Message': 'string',
        'SubmitTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ExpirationTime': datetime(2015, 1, 1),
        'InputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'OutputDataConfig': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'LanguageCode': 'en',
        'DataAccessRoleArn': 'string',
        'ManifestFilePath': 'string',
        'KMSKey': 'string',
        'ModelVersion': 'string'
    }
}

Response Structure

  • (dict) --
    • ComprehendMedicalAsyncJobProperties (dict) --

      Provides information about a detection job.

      • JobId (string) --

        The identifier assigned to the detection job.

      • JobName (string) --

        The name that you assigned to the detection job.

      • JobStatus (string) --

        The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

      • Message (string) --

        A description of the status of a job.

      • SubmitTime (datetime) --

        The time that the detection job was submitted for processing.

      • EndTime (datetime) --

        The time that the detection job completed.

      • ExpirationTime (datetime) --

        The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

      • InputDataConfig (dict) --

        The input data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

          Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

        • S3Key (string) --

          The path to the input data files in the S3 bucket.

      • OutputDataConfig (dict) --

        The output data configuration that you supplied when you created the detection job.

        • S3Bucket (string) --

          When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

        • S3Key (string) --

          The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

      • LanguageCode (string) --

        The language code of the input documents.

      • DataAccessRoleArn (string) --

        The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

      • ManifestFilePath (string) --

        The path to the file that describes the results of a batch job.

      • KMSKey (string) --

        The AWS Key Management Service key, if any, used to encrypt the output files.

      • ModelVersion (string) --

        The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
detect_entities(**kwargs)

The DetectEntities operation is deprecated. You should use the DetectEntitiesV2 operation instead.

Inspects the clinical text for a variety of medical entities and returns specific information about them such as entity category, location, and confidence score on that information .

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.detect_entities(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

A UTF-8 text string containing the clinical content being examined for entities. Each string must contain fewer than 20,000 bytes of characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Score': ...,
            'Text': 'string',
            'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
            'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
            'Traits': [
                {
                    'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                    'Score': ...
                },
            ],
            'Attributes': [
                {
                    'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'RelationshipType': 'EVERY'|'WITH_DOSAGE'|'ADMINISTERED_VIA'|'FOR'|'NEGATIVE'|'OVERLAP'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
                    'Traits': [
                        {
                            'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                            'Score': ...
                        },
                    ]
                },
            ]
        },
    ],
    'UnmappedAttributes': [
        {
            'Type': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
            'Attribute': {
                'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
                'Score': ...,
                'RelationshipScore': ...,
                'RelationshipType': 'EVERY'|'WITH_DOSAGE'|'ADMINISTERED_VIA'|'FOR'|'NEGATIVE'|'OVERLAP'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                'Id': 123,
                'BeginOffset': 123,
                'EndOffset': 123,
                'Text': 'string',
                'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
                'Traits': [
                    {
                        'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                        'Score': ...
                    },
                ]
            }
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string'
}

Response Structure

  • (dict) --
    • Entities (list) --

      The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical; has in the detection and analysis. Attributes and traits of the entity are also returned.

      • (dict) --

        Provides information about an extracted medical entity.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Score (float) --

          The level of confidence that Comprehend Medical; has in the accuracy of the detection.

        • Text (string) --

          The segment of input text extracted as this entity.

        • Category (string) --

          The category of the entity.

        • Type (string) --

          Describes the specific type of entity with category of entities.

        • Traits (list) --

          Contextual information for the entity.

          • (dict) --

            Provides contextual information about the extracted entity.

            • Name (string) --

              Provides a name or contextual description about the trait.

            • Score (float) --

              The level of confidence that Comprehend Medical; has in the accuracy of this trait.

        • Attributes (list) --

          The extracted attributes that relate to this entity.

          • (dict) --

            An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken. It contains information about the attribute such as id, begin and end offset within the input text, and the segment of the input text.

            • Type (string) --

              The type of attribute.

            • Score (float) --

              The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Comprehend Medical; has that this attribute is correctly related to this entity.

            • RelationshipType (string) --

              The type of relationship between the entity and attribute. Type for the relationship is OVERLAP , indicating that the entity occurred at the same time as the Date_Expression .

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text extracted as this attribute.

            • Category (string) --

              The category of attribute.

            • Traits (list) --

              Contextual information for this attribute.

              • (dict) --

                Provides contextual information about the extracted entity.

                • Name (string) --

                  Provides a name or contextual description about the trait.

                • Score (float) --

                  The level of confidence that Comprehend Medical; has in the accuracy of this trait.

    • UnmappedAttributes (list) --

      Attributes extracted from the input text that we were unable to relate to an entity.

      • (dict) --

        An attribute that was extracted, but Comprehend Medical; was unable to relate to an entity.

        • Type (string) --

          The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".

        • Attribute (dict) --

          The specific attribute that has been extracted but not mapped to an entity.

          • Type (string) --

            The type of attribute.

          • Score (float) --

            The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as an attribute.

          • RelationshipScore (float) --

            The level of confidence that Comprehend Medical; has that this attribute is correctly related to this entity.

          • RelationshipType (string) --

            The type of relationship between the entity and attribute. Type for the relationship is OVERLAP , indicating that the entity occurred at the same time as the Date_Expression .

          • Id (integer) --

            The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

          • BeginOffset (integer) --

            The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

          • EndOffset (integer) --

            The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

          • Text (string) --

            The segment of input text extracted as this attribute.

          • Category (string) --

            The category of attribute.

          • Traits (list) --

            Contextual information for this attribute.

            • (dict) --

              Provides contextual information about the extracted entity.

              • Name (string) --

                Provides a name or contextual description about the trait.

              • Score (float) --

                The level of confidence that Comprehend Medical; has in the accuracy of this trait.

    • PaginationToken (string) --

      If the result of the previous request to DetectEntities was truncated, include the PaginationToken to fetch the next page of entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
detect_entities_v2(**kwargs)

Inspects the clinical text for a variety of medical entities and returns specific information about them such as entity category, location, and confidence score on that information. Amazon Comprehend Medical only detects medical entities in English language texts.

The DetectEntitiesV2 operation replaces the DetectEntities operation. This new action uses a different model for determining the entities in your medical text and changes the way that some entities are returned in the output. You should use the DetectEntitiesV2 operation in all new applications.

The DetectEntitiesV2 operation returns the Acuity and Direction entities as attributes instead of types.

See also: AWS API Documentation

Request Syntax

response = client.detect_entities_v2(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

A UTF-8 string containing the clinical content being examined for entities. Each string must contain fewer than 20,000 bytes of characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Score': ...,
            'Text': 'string',
            'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
            'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
            'Traits': [
                {
                    'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                    'Score': ...
                },
            ],
            'Attributes': [
                {
                    'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'RelationshipType': 'EVERY'|'WITH_DOSAGE'|'ADMINISTERED_VIA'|'FOR'|'NEGATIVE'|'OVERLAP'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
                    'Traits': [
                        {
                            'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                            'Score': ...
                        },
                    ]
                },
            ]
        },
    ],
    'UnmappedAttributes': [
        {
            'Type': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
            'Attribute': {
                'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
                'Score': ...,
                'RelationshipScore': ...,
                'RelationshipType': 'EVERY'|'WITH_DOSAGE'|'ADMINISTERED_VIA'|'FOR'|'NEGATIVE'|'OVERLAP'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                'Id': 123,
                'BeginOffset': 123,
                'EndOffset': 123,
                'Text': 'string',
                'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
                'Traits': [
                    {
                        'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                        'Score': ...
                    },
                ]
            }
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string'
}

Response Structure

  • (dict) --
    • Entities (list) --

      The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence in the detection and analysis. Attributes and traits of the entity are also returned.

      • (dict) --

        Provides information about an extracted medical entity.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Score (float) --

          The level of confidence that Comprehend Medical; has in the accuracy of the detection.

        • Text (string) --

          The segment of input text extracted as this entity.

        • Category (string) --

          The category of the entity.

        • Type (string) --

          Describes the specific type of entity with category of entities.

        • Traits (list) --

          Contextual information for the entity.

          • (dict) --

            Provides contextual information about the extracted entity.

            • Name (string) --

              Provides a name or contextual description about the trait.

            • Score (float) --

              The level of confidence that Comprehend Medical; has in the accuracy of this trait.

        • Attributes (list) --

          The extracted attributes that relate to this entity.

          • (dict) --

            An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken. It contains information about the attribute such as id, begin and end offset within the input text, and the segment of the input text.

            • Type (string) --

              The type of attribute.

            • Score (float) --

              The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Comprehend Medical; has that this attribute is correctly related to this entity.

            • RelationshipType (string) --

              The type of relationship between the entity and attribute. Type for the relationship is OVERLAP , indicating that the entity occurred at the same time as the Date_Expression .

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text extracted as this attribute.

            • Category (string) --

              The category of attribute.

            • Traits (list) --

              Contextual information for this attribute.

              • (dict) --

                Provides contextual information about the extracted entity.

                • Name (string) --

                  Provides a name or contextual description about the trait.

                • Score (float) --

                  The level of confidence that Comprehend Medical; has in the accuracy of this trait.

    • UnmappedAttributes (list) --

      Attributes extracted from the input text that couldn't be related to an entity.

      • (dict) --

        An attribute that was extracted, but Comprehend Medical; was unable to relate to an entity.

        • Type (string) --

          The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".

        • Attribute (dict) --

          The specific attribute that has been extracted but not mapped to an entity.

          • Type (string) --

            The type of attribute.

          • Score (float) --

            The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as an attribute.

          • RelationshipScore (float) --

            The level of confidence that Comprehend Medical; has that this attribute is correctly related to this entity.

          • RelationshipType (string) --

            The type of relationship between the entity and attribute. Type for the relationship is OVERLAP , indicating that the entity occurred at the same time as the Date_Expression .

          • Id (integer) --

            The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

          • BeginOffset (integer) --

            The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

          • EndOffset (integer) --

            The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

          • Text (string) --

            The segment of input text extracted as this attribute.

          • Category (string) --

            The category of attribute.

          • Traits (list) --

            Contextual information for this attribute.

            • (dict) --

              Provides contextual information about the extracted entity.

              • Name (string) --

                Provides a name or contextual description about the trait.

              • Score (float) --

                The level of confidence that Comprehend Medical; has in the accuracy of this trait.

    • PaginationToken (string) --

      If the result to the DetectEntitiesV2 operation was truncated, include the PaginationToken to fetch the next page of entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
detect_phi(**kwargs)

Inspects the clinical text for protected health information (PHI) entities and returns the entity category, location, and confidence score for each entity. Amazon Comprehend Medical only detects entities in English language texts.

See also: AWS API Documentation

Request Syntax

response = client.detect_phi(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

A UTF-8 text string containing the clinical content being examined for PHI entities. Each string must contain fewer than 20,000 bytes of characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Score': ...,
            'Text': 'string',
            'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
            'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
            'Traits': [
                {
                    'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                    'Score': ...
                },
            ],
            'Attributes': [
                {
                    'Type': 'NAME'|'DX_NAME'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'GENERIC_NAME'|'BRAND_NAME'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_NAME'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'PROCEDURE_NAME'|'TREATMENT_NAME'|'DATE'|'AGE'|'CONTACT_POINT'|'PHONE_OR_FAX'|'EMAIL'|'IDENTIFIER'|'ID'|'URL'|'ADDRESS'|'PROFESSION'|'SYSTEM_ORGAN_SITE'|'DIRECTION'|'QUALITY'|'QUANTITY'|'TIME_EXPRESSION'|'TIME_TO_MEDICATION_NAME'|'TIME_TO_DX_NAME'|'TIME_TO_TEST_NAME'|'TIME_TO_PROCEDURE_NAME'|'TIME_TO_TREATMENT_NAME',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'RelationshipType': 'EVERY'|'WITH_DOSAGE'|'ADMINISTERED_VIA'|'FOR'|'NEGATIVE'|'OVERLAP'|'DOSAGE'|'ROUTE_OR_MODE'|'FORM'|'FREQUENCY'|'DURATION'|'STRENGTH'|'RATE'|'ACUITY'|'TEST_VALUE'|'TEST_UNITS'|'TEST_UNIT'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Category': 'MEDICATION'|'MEDICAL_CONDITION'|'PROTECTED_HEALTH_INFORMATION'|'TEST_TREATMENT_PROCEDURE'|'ANATOMY'|'TIME_EXPRESSION',
                    'Traits': [
                        {
                            'Name': 'SIGN'|'SYMPTOM'|'DIAGNOSIS'|'NEGATION',
                            'Score': ...
                        },
                    ]
                },
            ]
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string'
}

Response Structure

  • (dict) --
    • Entities (list) --

      The collection of PHI entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical; has in its detection.

      • (dict) --

        Provides information about an extracted medical entity.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Score (float) --

          The level of confidence that Comprehend Medical; has in the accuracy of the detection.

        • Text (string) --

          The segment of input text extracted as this entity.

        • Category (string) --

          The category of the entity.

        • Type (string) --

          Describes the specific type of entity with category of entities.

        • Traits (list) --

          Contextual information for the entity.

          • (dict) --

            Provides contextual information about the extracted entity.

            • Name (string) --

              Provides a name or contextual description about the trait.

            • Score (float) --

              The level of confidence that Comprehend Medical; has in the accuracy of this trait.

        • Attributes (list) --

          The extracted attributes that relate to this entity.

          • (dict) --

            An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken. It contains information about the attribute such as id, begin and end offset within the input text, and the segment of the input text.

            • Type (string) --

              The type of attribute.

            • Score (float) --

              The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Comprehend Medical; has that this attribute is correctly related to this entity.

            • RelationshipType (string) --

              The type of relationship between the entity and attribute. Type for the relationship is OVERLAP , indicating that the entity occurred at the same time as the Date_Expression .

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text extracted as this attribute.

            • Category (string) --

              The category of attribute.

            • Traits (list) --

              Contextual information for this attribute.

              • (dict) --

                Provides contextual information about the extracted entity.

                • Name (string) --

                  Provides a name or contextual description about the trait.

                • Score (float) --

                  The level of confidence that Comprehend Medical; has in the accuracy of this trait.

    • PaginationToken (string) --

      If the result of the previous request to DetectPHI was truncated, include the PaginationToken to fetch the next page of PHI entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
infer_icd10_cm(**kwargs)

InferICD10CM detects medical conditions as entities listed in a patient record and links those entities to normalized concept identifiers in the ICD-10-CM knowledge base from the Centers for Disease Control. Amazon Comprehend Medical only detects medical entities in English language texts.

See also: AWS API Documentation

Request Syntax

response = client.infer_icd10_cm(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

The input text used for analysis. The input for InferICD10CM is a string from 1 to 10000 characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'Text': 'string',
            'Category': 'MEDICAL_CONDITION',
            'Type': 'DX_NAME'|'TIME_EXPRESSION',
            'Score': ...,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Attributes': [
                {
                    'Type': 'ACUITY'|'DIRECTION'|'SYSTEM_ORGAN_SITE'|'QUALITY'|'QUANTITY'|'TIME_TO_DX_NAME'|'TIME_EXPRESSION',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Traits': [
                        {
                            'Name': 'NEGATION'|'DIAGNOSIS'|'SIGN'|'SYMPTOM',
                            'Score': ...
                        },
                    ],
                    'Category': 'DX_NAME'|'TIME_EXPRESSION',
                    'RelationshipType': 'OVERLAP'|'SYSTEM_ORGAN_SITE'
                },
            ],
            'Traits': [
                {
                    'Name': 'NEGATION'|'DIAGNOSIS'|'SIGN'|'SYMPTOM',
                    'Score': ...
                },
            ],
            'ICD10CMConcepts': [
                {
                    'Description': 'string',
                    'Code': 'string',
                    'Score': ...
                },
            ]
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string'
}

Response Structure

  • (dict) --
    • Entities (list) --

      The medical conditions detected in the text linked to ICD-10-CM concepts. If the action is successful, the service sends back an HTTP 200 response, as well as the entities detected.

      • (dict) --

        The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Amazon Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • Text (string) --

          The segment of input text that is matched to the detected entity.

        • Category (string) --

          The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION category.

        • Type (string) --

          Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type DX_NAME and TIME_EXPRESSION .

        • Score (float) --

          The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Attributes (list) --

          The detected attributes that relate to the entity. An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the nature of a medical condition.

          • (dict) --

            The detected attributes that relate to an entity. This includes an extracted segment of the text that is an attribute of an entity, or otherwise related to an entity. InferICD10CM detects the following attributes: Direction , System, Organ or Site , and Acuity .

            • Type (string) --

              The type of attribute. InferICD10CM detects entities of the type DX_NAME .

            • Score (float) --

              The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Amazon Comprehend Medical has that this attribute is correctly related to this entity.

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text which contains the detected attribute.

            • Traits (list) --

              The contextual information for the attribute. The traits recognized by InferICD10CM are DIAGNOSIS , SIGN , SYMPTOM , and NEGATION .

              • (dict) --

                Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS , SIGN , SYMPTOM , and NEGATION .

                • Name (string) --

                  Provides a name or contextual description about the trait.

                • Score (float) --

                  The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as a trait.

            • Category (string) --

              The category of attribute. Can be either of DX_NAME or TIME_EXPRESSION .

            • RelationshipType (string) --

              The type of relationship between the entity and attribute. Type for the relationship can be either of OVERLAP or SYSTEM_ORGAN_SITE .

        • Traits (list) --

          Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS , SIGN , SYMPTOM , and NEGATION.

          • (dict) --

            Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS , SIGN , SYMPTOM , and NEGATION .

            • Name (string) --

              Provides a name or contextual description about the trait.

            • Score (float) --

              The level of confidence that Comprehend Medical; has that the segment of text is correctly recognized as a trait.

        • ICD10CMConcepts (list) --

          The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match.

          • (dict) --

            The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match.

            • Description (string) --

              The long description of the ICD-10-CM code in the ontology.

            • Code (string) --

              The ICD-10-CM code that identifies the concept found in the knowledge base from the Centers for Disease Control.

            • Score (float) --

              The level of confidence that Amazon Comprehend Medical has that the entity is accurately linked to an ICD-10-CM concept.

    • PaginationToken (string) --

      If the result of the previous request to InferICD10CM was truncated, include the PaginationToken to fetch the next page of medical condition entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents, in the format n .*n* .*n* You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
infer_rx_norm(**kwargs)

InferRxNorm detects medications as entities listed in a patient record and links to the normalized concept identifiers in the RxNorm database from the National Library of Medicine. Amazon Comprehend Medical only detects medical entities in English language texts.

See also: AWS API Documentation

Request Syntax

response = client.infer_rx_norm(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

The input text used for analysis. The input for InferRxNorm is a string from 1 to 10000 characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'Text': 'string',
            'Category': 'MEDICATION',
            'Type': 'BRAND_NAME'|'GENERIC_NAME',
            'Score': ...,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Attributes': [
                {
                    'Type': 'DOSAGE'|'DURATION'|'FORM'|'FREQUENCY'|'RATE'|'ROUTE_OR_MODE'|'STRENGTH',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Traits': [
                        {
                            'Name': 'NEGATION',
                            'Score': ...
                        },
                    ]
                },
            ],
            'Traits': [
                {
                    'Name': 'NEGATION',
                    'Score': ...
                },
            ],
            'RxNormConcepts': [
                {
                    'Description': 'string',
                    'Code': 'string',
                    'Score': ...
                },
            ]
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string'
}

Response Structure

  • (dict) --
    • Entities (list) --

      The medication entities detected in the text linked to RxNorm concepts. If the action is successful, the service sends back an HTTP 200 response, as well as the entities detected.

      • (dict) --

        The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Amazon Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • Text (string) --

          The segment of input text extracted from which the entity was detected.

        • Category (string) --

          The category of the entity. The recognized categories are GENERIC or BRAND_NAME .

        • Type (string) --

          Describes the specific type of entity. For InferRxNorm, the recognized entity type is MEDICATION .

        • Score (float) --

          The level of confidence that Amazon Comprehend Medical has in the accuracy of the detected entity.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Attributes (list) --

          The extracted attributes that relate to the entity. The attributes recognized by InferRxNorm are DOSAGE , DURATION , FORM , FREQUENCY , RATE , ROUTE_OR_MODE , and STRENGTH .

          • (dict) --

            The extracted attributes that relate to this entity. The attributes recognized by InferRxNorm are DOSAGE , DURATION , FORM , FREQUENCY , RATE , ROUTE_OR_MODE .

            • Type (string) --

              The type of attribute. The types of attributes recognized by InferRxNorm are BRAND_NAME and GENERIC_NAME .

            • Score (float) --

              The level of confidence that Comprehend Medical has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Amazon Comprehend Medical has that the attribute is accurately linked to an entity.

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text which corresponds to the detected attribute.

            • Traits (list) --

              Contextual information for the attribute. InferRxNorm recognizes the trait NEGATION for attributes, i.e. that the patient is not taking a specific dose or form of a medication.

              • (dict) --

                The contextual information for the entity. InferRxNorm recognizes the trait NEGATION , which is any indication that the patient is not taking a medication.

                • Name (string) --

                  Provides a name or contextual description about the trait.

                • Score (float) --

                  The level of confidence that Amazon Comprehend Medical has in the accuracy of the detected trait.

        • Traits (list) --

          Contextual information for the entity.

          • (dict) --

            The contextual information for the entity. InferRxNorm recognizes the trait NEGATION , which is any indication that the patient is not taking a medication.

            • Name (string) --

              Provides a name or contextual description about the trait.

            • Score (float) --

              The level of confidence that Amazon Comprehend Medical has in the accuracy of the detected trait.

        • RxNormConcepts (list) --

          The RxNorm concepts that the entity could refer to, along with a score indicating the likelihood of the match.

          • (dict) --

            The RxNorm concept that the entity could refer to, along with a score indicating the likelihood of the match.

            • Description (string) --

              The description of the RxNorm concept.

            • Code (string) --

              RxNorm concept ID, also known as the RxCUI.

            • Score (float) --

              The level of confidence that Amazon Comprehend Medical has that the entity is accurately linked to the reported RxNorm concept.

    • PaginationToken (string) --

      If the result of the previous request to InferRxNorm was truncated, include the PaginationToken to fetch the next page of medication entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents, in the format n .*n* .*n* You can use this information to track the model used for a particular batch of documents.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
infer_snomedct(**kwargs)

InferSNOMEDCT detects possible medical concepts as entities and links them to codes from the Systematized Nomenclature of Medicine, Clinical Terms (SNOMED-CT) ontology

See also: AWS API Documentation

Request Syntax

response = client.infer_snomedct(
    Text='string'
)
Parameters
Text (string) --

[REQUIRED]

The input text to be analyzed using InferSNOMEDCT. The text should be a string with 1 to 10000 characters.

Return type
dict
Returns
Response Syntax
{
    'Entities': [
        {
            'Id': 123,
            'Text': 'string',
            'Category': 'MEDICAL_CONDITION'|'ANATOMY'|'TEST_TREATMENT_PROCEDURE',
            'Type': 'DX_NAME'|'TEST_NAME'|'PROCEDURE_NAME'|'TREATMENT_NAME',
            'Score': ...,
            'BeginOffset': 123,
            'EndOffset': 123,
            'Attributes': [
                {
                    'Category': 'MEDICAL_CONDITION'|'ANATOMY'|'TEST_TREATMENT_PROCEDURE',
                    'Type': 'ACUITY'|'QUALITY'|'DIRECTION'|'SYSTEM_ORGAN_SITE'|'TEST_VALUE'|'TEST_UNIT',
                    'Score': ...,
                    'RelationshipScore': ...,
                    'RelationshipType': 'ACUITY'|'QUALITY'|'TEST_VALUE'|'TEST_UNITS'|'DIRECTION'|'SYSTEM_ORGAN_SITE',
                    'Id': 123,
                    'BeginOffset': 123,
                    'EndOffset': 123,
                    'Text': 'string',
                    'Traits': [
                        {
                            'Name': 'NEGATION'|'DIAGNOSIS'|'SIGN'|'SYMPTOM',
                            'Score': ...
                        },
                    ],
                    'SNOMEDCTConcepts': [
                        {
                            'Description': 'string',
                            'Code': 'string',
                            'Score': ...
                        },
                    ]
                },
            ],
            'Traits': [
                {
                    'Name': 'NEGATION'|'DIAGNOSIS'|'SIGN'|'SYMPTOM',
                    'Score': ...
                },
            ],
            'SNOMEDCTConcepts': [
                {
                    'Description': 'string',
                    'Code': 'string',
                    'Score': ...
                },
            ]
        },
    ],
    'PaginationToken': 'string',
    'ModelVersion': 'string',
    'SNOMEDCTDetails': {
        'Edition': 'string',
        'Language': 'string',
        'VersionDate': 'string'
    },
    'Characters': {
        'OriginalTextCharacters': 123
    }
}

Response Structure

  • (dict) --
    • Entities (list) --

      The collection of medical concept entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.

      • (dict) --

        The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.

        • Id (integer) --

          The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        • Text (string) --

          The segment of input text extracted as this entity.

        • Category (string) --

          The category of the detected entity. Possible categories are MEDICAL_CONDITION, ANATOMY, or TEST_TREATMENT_PROCEDURE.

        • Type (string) --

          Describes the specific type of entity with category of entities. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE, TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, or TREATMENT_NAME.

        • Score (float) --

          The level of confidence that Comprehend Medical has in the accuracy of the detected entity.

        • BeginOffset (integer) --

          The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        • EndOffset (integer) --

          The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        • Attributes (list) --

          An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken.

          • (dict) --

            The extracted attributes that relate to an entity. An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the dosage of a medication taken.

            • Category (string) --

              The category of the detected attribute. Possible categories include MEDICAL_CONDITION, ANATOMY, and TEST_TREATMENT_PROCEDURE.

            • Type (string) --

              The type of attribute. Possible types include DX_NAME, ACUITY, DIRECTION, SYSTEM_ORGAN_SITE,TEST_NAME, TEST_VALUE, TEST_UNIT, PROCEDURE_NAME, and TREATMENT_NAME.

            • Score (float) --

              The level of confidence that Comprehend Medical has that the segment of text is correctly recognized as an attribute.

            • RelationshipScore (float) --

              The level of confidence that Comprehend Medical has that this attribute is correctly related to this entity.

            • RelationshipType (string) --

              The type of relationship that exists between the entity and the related attribute.

            • Id (integer) --

              The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.

            • BeginOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.

            • EndOffset (integer) --

              The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.

            • Text (string) --

              The segment of input text extracted as this attribute.

            • Traits (list) --

              Contextual information for an attribute. Examples include signs, symptoms, diagnosis, and negation.

              • (dict) --

                Contextual information for an entity.

                • Name (string) --

                  The name or contextual description of a detected trait.

                • Score (float) --

                  The level of confidence that Comprehend Medical has in the accuracy of a detected trait.

            • SNOMEDCTConcepts (list) --

              The SNOMED-CT concepts specific to an attribute, along with a score indicating the likelihood of the match.

              • (dict) --

                The SNOMED-CT concepts that the entity could refer to, along with a score indicating the likelihood of the match.

                • Description (string) --

                  The description of the SNOMED-CT concept.

                • Code (string) --

                  The numeric ID for the SNOMED-CT concept.

                • Score (float) --

                  The level of confidence Comprehend Medical has that the entity should be linked to the identified SNOMED-CT concept.

        • Traits (list) --

          Contextual information for the entity.

          • (dict) --

            Contextual information for an entity.

            • Name (string) --

              The name or contextual description of a detected trait.

            • Score (float) --

              The level of confidence that Comprehend Medical has in the accuracy of a detected trait.

        • SNOMEDCTConcepts (list) --

          The SNOMED concepts that the entity could refer to, along with a score indicating the likelihood of the match.

          • (dict) --

            The SNOMED-CT concepts that the entity could refer to, along with a score indicating the likelihood of the match.

            • Description (string) --

              The description of the SNOMED-CT concept.

            • Code (string) --

              The numeric ID for the SNOMED-CT concept.

            • Score (float) --

              The level of confidence Comprehend Medical has that the entity should be linked to the identified SNOMED-CT concept.

    • PaginationToken (string) --

      If the result of the request is truncated, the pagination token can be used to fetch the next page of entities.

    • ModelVersion (string) --

      The version of the model used to analyze the documents, in the format n.n.n You can use this information to track the model used for a particular batch of documents.

    • SNOMEDCTDetails (dict) --

      The details of the SNOMED-CT revision, including the edition, language, and version date.

      • Edition (string) --

        The edition of SNOMED-CT used. The edition used for the InferSNOMEDCT editions is the US edition.

      • Language (string) --

        The language used in the SNOMED-CT ontology. All Amazon Comprehend Medical operations are US English (en).

      • VersionDate (string) --

        The version date of the SNOMED-CT ontology used.

    • Characters (dict) --

      The number of characters in the input request documentation.

      • OriginalTextCharacters (integer) --

        The number of characters present in the input text document as processed by Comprehend Medical.

Exceptions

  • ComprehendMedical.Client.exceptions.InternalServerException
  • ComprehendMedical.Client.exceptions.ServiceUnavailableException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.InvalidEncodingException
  • ComprehendMedical.Client.exceptions.TextSizeLimitExceededException
list_entities_detection_v2_jobs(**kwargs)

Gets a list of medical entity detection jobs that you have submitted.

See also: AWS API Documentation

Request Syntax

response = client.list_entities_detection_v2_jobs(
    Filter={
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'SubmitTimeBefore': datetime(2015, 1, 1),
        'SubmitTimeAfter': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filter (dict) --

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

    • JobName (string) --

      Filters on the name of the job.

    • JobStatus (string) --

      Filters the list of jobs based on job status. Returns only jobs with the specified status.

    • SubmitTimeBefore (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.

    • SubmitTimeAfter (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.

  • NextToken (string) -- Identifies the next page of results to return.
  • MaxResults (integer) -- The maximum number of results to return in each page. The default is 100.
Return type

dict

Returns

Response Syntax

{
    'ComprehendMedicalAsyncJobPropertiesList': [
        {
            'JobId': 'string',
            'JobName': 'string',
            'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
            'Message': 'string',
            'SubmitTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'InputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'OutputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'LanguageCode': 'en',
            'DataAccessRoleArn': 'string',
            'ManifestFilePath': 'string',
            'KMSKey': 'string',
            'ModelVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComprehendMedicalAsyncJobPropertiesList (list) --

      A list containing the properties of each job returned.

      • (dict) --

        Provides information about a detection job.

        • JobId (string) --

          The identifier assigned to the detection job.

        • JobName (string) --

          The name that you assigned to the detection job.

        • JobStatus (string) --

          The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

        • Message (string) --

          A description of the status of a job.

        • SubmitTime (datetime) --

          The time that the detection job was submitted for processing.

        • EndTime (datetime) --

          The time that the detection job completed.

        • ExpirationTime (datetime) --

          The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

        • InputDataConfig (dict) --

          The input data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

            Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

          • S3Key (string) --

            The path to the input data files in the S3 bucket.

        • OutputDataConfig (dict) --

          The output data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

          • S3Key (string) --

            The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

        • LanguageCode (string) --

          The language code of the input documents.

        • DataAccessRoleArn (string) --

          The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

        • ManifestFilePath (string) --

          The path to the file that describes the results of a batch job.

        • KMSKey (string) --

          The AWS Key Management Service key, if any, used to encrypt the output files.

        • ModelVersion (string) --

          The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

    • NextToken (string) --

      Identifies the next page of results to return.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ValidationException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException
list_icd10_cm_inference_jobs(**kwargs)

Gets a list of InferICD10CM jobs that you have submitted.

See also: AWS API Documentation

Request Syntax

response = client.list_icd10_cm_inference_jobs(
    Filter={
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'SubmitTimeBefore': datetime(2015, 1, 1),
        'SubmitTimeAfter': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filter (dict) --

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

    • JobName (string) --

      Filters on the name of the job.

    • JobStatus (string) --

      Filters the list of jobs based on job status. Returns only jobs with the specified status.

    • SubmitTimeBefore (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.

    • SubmitTimeAfter (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.

  • NextToken (string) -- Identifies the next page of results to return.
  • MaxResults (integer) -- The maximum number of results to return in each page. The default is 100.
Return type

dict

Returns

Response Syntax

{
    'ComprehendMedicalAsyncJobPropertiesList': [
        {
            'JobId': 'string',
            'JobName': 'string',
            'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
            'Message': 'string',
            'SubmitTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'InputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'OutputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'LanguageCode': 'en',
            'DataAccessRoleArn': 'string',
            'ManifestFilePath': 'string',
            'KMSKey': 'string',
            'ModelVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComprehendMedicalAsyncJobPropertiesList (list) --

      A list containing the properties of each job that is returned.

      • (dict) --

        Provides information about a detection job.

        • JobId (string) --

          The identifier assigned to the detection job.

        • JobName (string) --

          The name that you assigned to the detection job.

        • JobStatus (string) --

          The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

        • Message (string) --

          A description of the status of a job.

        • SubmitTime (datetime) --

          The time that the detection job was submitted for processing.

        • EndTime (datetime) --

          The time that the detection job completed.

        • ExpirationTime (datetime) --

          The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

        • InputDataConfig (dict) --

          The input data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

            Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

          • S3Key (string) --

            The path to the input data files in the S3 bucket.

        • OutputDataConfig (dict) --

          The output data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

          • S3Key (string) --

            The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

        • LanguageCode (string) --

          The language code of the input documents.

        • DataAccessRoleArn (string) --

          The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

        • ManifestFilePath (string) --

          The path to the file that describes the results of a batch job.

        • KMSKey (string) --

          The AWS Key Management Service key, if any, used to encrypt the output files.

        • ModelVersion (string) --

          The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

    • NextToken (string) --

      Identifies the next page of results to return.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ValidationException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException
list_phi_detection_jobs(**kwargs)

Gets a list of protected health information (PHI) detection jobs that you have submitted.

See also: AWS API Documentation

Request Syntax

response = client.list_phi_detection_jobs(
    Filter={
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'SubmitTimeBefore': datetime(2015, 1, 1),
        'SubmitTimeAfter': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filter (dict) --

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

    • JobName (string) --

      Filters on the name of the job.

    • JobStatus (string) --

      Filters the list of jobs based on job status. Returns only jobs with the specified status.

    • SubmitTimeBefore (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.

    • SubmitTimeAfter (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.

  • NextToken (string) -- Identifies the next page of results to return.
  • MaxResults (integer) -- The maximum number of results to return in each page. The default is 100.
Return type

dict

Returns

Response Syntax

{
    'ComprehendMedicalAsyncJobPropertiesList': [
        {
            'JobId': 'string',
            'JobName': 'string',
            'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
            'Message': 'string',
            'SubmitTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'InputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'OutputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'LanguageCode': 'en',
            'DataAccessRoleArn': 'string',
            'ManifestFilePath': 'string',
            'KMSKey': 'string',
            'ModelVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComprehendMedicalAsyncJobPropertiesList (list) --

      A list containing the properties of each job returned.

      • (dict) --

        Provides information about a detection job.

        • JobId (string) --

          The identifier assigned to the detection job.

        • JobName (string) --

          The name that you assigned to the detection job.

        • JobStatus (string) --

          The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

        • Message (string) --

          A description of the status of a job.

        • SubmitTime (datetime) --

          The time that the detection job was submitted for processing.

        • EndTime (datetime) --

          The time that the detection job completed.

        • ExpirationTime (datetime) --

          The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

        • InputDataConfig (dict) --

          The input data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

            Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

          • S3Key (string) --

            The path to the input data files in the S3 bucket.

        • OutputDataConfig (dict) --

          The output data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

          • S3Key (string) --

            The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

        • LanguageCode (string) --

          The language code of the input documents.

        • DataAccessRoleArn (string) --

          The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

        • ManifestFilePath (string) --

          The path to the file that describes the results of a batch job.

        • KMSKey (string) --

          The AWS Key Management Service key, if any, used to encrypt the output files.

        • ModelVersion (string) --

          The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

    • NextToken (string) --

      Identifies the next page of results to return.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ValidationException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException
list_rx_norm_inference_jobs(**kwargs)

Gets a list of InferRxNorm jobs that you have submitted.

See also: AWS API Documentation

Request Syntax

response = client.list_rx_norm_inference_jobs(
    Filter={
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'SubmitTimeBefore': datetime(2015, 1, 1),
        'SubmitTimeAfter': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filter (dict) --

    Filters the jobs that are returned. You can filter jobs based on their names, status, or the date and time that they were submitted. You can only set one filter at a time.

    • JobName (string) --

      Filters on the name of the job.

    • JobStatus (string) --

      Filters the list of jobs based on job status. Returns only jobs with the specified status.

    • SubmitTimeBefore (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.

    • SubmitTimeAfter (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.

  • NextToken (string) -- Identifies the next page of results to return.
  • MaxResults (integer) -- Identifies the next page of results to return.
Return type

dict

Returns

Response Syntax

{
    'ComprehendMedicalAsyncJobPropertiesList': [
        {
            'JobId': 'string',
            'JobName': 'string',
            'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
            'Message': 'string',
            'SubmitTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'InputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'OutputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'LanguageCode': 'en',
            'DataAccessRoleArn': 'string',
            'ManifestFilePath': 'string',
            'KMSKey': 'string',
            'ModelVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComprehendMedicalAsyncJobPropertiesList (list) --

      The maximum number of results to return in each page. The default is 100.

      • (dict) --

        Provides information about a detection job.

        • JobId (string) --

          The identifier assigned to the detection job.

        • JobName (string) --

          The name that you assigned to the detection job.

        • JobStatus (string) --

          The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

        • Message (string) --

          A description of the status of a job.

        • SubmitTime (datetime) --

          The time that the detection job was submitted for processing.

        • EndTime (datetime) --

          The time that the detection job completed.

        • ExpirationTime (datetime) --

          The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

        • InputDataConfig (dict) --

          The input data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

            Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

          • S3Key (string) --

            The path to the input data files in the S3 bucket.

        • OutputDataConfig (dict) --

          The output data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

          • S3Key (string) --

            The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

        • LanguageCode (string) --

          The language code of the input documents.

        • DataAccessRoleArn (string) --

          The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

        • ManifestFilePath (string) --

          The path to the file that describes the results of a batch job.

        • KMSKey (string) --

          The AWS Key Management Service key, if any, used to encrypt the output files.

        • ModelVersion (string) --

          The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

    • NextToken (string) --

      Identifies the next page of results to return.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ValidationException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException
list_snomedct_inference_jobs(**kwargs)

Gets a list of InferSNOMEDCT jobs a user has submitted.

See also: AWS API Documentation

Request Syntax

response = client.list_snomedct_inference_jobs(
    Filter={
        'JobName': 'string',
        'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
        'SubmitTimeBefore': datetime(2015, 1, 1),
        'SubmitTimeAfter': datetime(2015, 1, 1)
    },
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filter (dict) --

    Provides information for filtering a list of detection jobs.

    • JobName (string) --

      Filters on the name of the job.

    • JobStatus (string) --

      Filters the list of jobs based on job status. Returns only jobs with the specified status.

    • SubmitTimeBefore (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.

    • SubmitTimeAfter (datetime) --

      Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.

  • NextToken (string) -- Identifies the next page of InferSNOMEDCT results to return.
  • MaxResults (integer) -- The maximum number of results to return in each page. The default is 100.
Return type

dict

Returns

Response Syntax

{
    'ComprehendMedicalAsyncJobPropertiesList': [
        {
            'JobId': 'string',
            'JobName': 'string',
            'JobStatus': 'SUBMITTED'|'IN_PROGRESS'|'COMPLETED'|'PARTIAL_SUCCESS'|'FAILED'|'STOP_REQUESTED'|'STOPPED',
            'Message': 'string',
            'SubmitTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'ExpirationTime': datetime(2015, 1, 1),
            'InputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'OutputDataConfig': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'LanguageCode': 'en',
            'DataAccessRoleArn': 'string',
            'ManifestFilePath': 'string',
            'KMSKey': 'string',
            'ModelVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ComprehendMedicalAsyncJobPropertiesList (list) --

      A list containing the properties of each job that is returned.

      • (dict) --

        Provides information about a detection job.

        • JobId (string) --

          The identifier assigned to the detection job.

        • JobName (string) --

          The name that you assigned to the detection job.

        • JobStatus (string) --

          The current status of the detection job. If the status is FAILED , the Message field shows the reason for the failure.

        • Message (string) --

          A description of the status of a job.

        • SubmitTime (datetime) --

          The time that the detection job was submitted for processing.

        • EndTime (datetime) --

          The time that the detection job completed.

        • ExpirationTime (datetime) --

          The date and time that job metadata is deleted from the server. Output files in your S3 bucket will not be deleted. After the metadata is deleted, the job will no longer appear in the results of the ListEntitiesDetectionV2Job or the ListPHIDetectionJobs operation.

        • InputDataConfig (dict) --

          The input data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

            Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

          • S3Key (string) --

            The path to the input data files in the S3 bucket.

        • OutputDataConfig (dict) --

          The output data configuration that you supplied when you created the detection job.

          • S3Bucket (string) --

            When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

          • S3Key (string) --

            The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

        • LanguageCode (string) --

          The language code of the input documents.

        • DataAccessRoleArn (string) --

          The Amazon Resource Name (ARN) that gives Comprehend Medical; read access to your input data.

        • ManifestFilePath (string) --

          The path to the file that describes the results of a batch job.

        • KMSKey (string) --

          The AWS Key Management Service key, if any, used to encrypt the output files.

        • ModelVersion (string) --

          The version of the model used to analyze the documents. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.

    • NextToken (string) --

      Identifies the next page of results to return.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ValidationException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException
start_entities_detection_v2_job(**kwargs)

Starts an asynchronous medical entity detection job for a collection of documents. Use the DescribeEntitiesDetectionV2Job operation to track the status of a job.

See also: AWS API Documentation

Request Syntax

response = client.start_entities_detection_v2_job(
    InputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    OutputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    DataAccessRoleArn='string',
    JobName='string',
    ClientRequestToken='string',
    KMSKey='string',
    LanguageCode='en'
)
Parameters
  • InputDataConfig (dict) --

    [REQUIRED]

    The input configuration that specifies the format and location of the input data for the job.

    • S3Bucket (string) -- [REQUIRED]

      The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

      Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

    • S3Key (string) --

      The path to the input data files in the S3 bucket.

  • OutputDataConfig (dict) --

    [REQUIRED]

    The output configuration that specifies where to send the output files.

    • S3Bucket (string) -- [REQUIRED]

      When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

    • S3Key (string) --

      The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

  • DataAccessRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Comprehend Medical; read access to your input data. For more information, see Role-Based Permissions Required for Asynchronous Operations .

  • JobName (string) -- The identifier of the job.
  • ClientRequestToken (string) --

    A unique identifier for the request. If you don't set the client request token, Comprehend Medical; generates one for you.

    This field is autopopulated if not provided.

  • KMSKey (string) -- An AWS Key Management Service key to encrypt your output files. If you do not specify a key, the files are written in plain text.
  • LanguageCode (string) --

    [REQUIRED]

    The language of the input documents. All documents must be in the same language. Comprehend Medical; processes files in US English (en).

Return type

dict

Returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier generated for the job. To get the status of a job, use this identifier with the DescribeEntitiesDetectionV2Job operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
start_icd10_cm_inference_job(**kwargs)

Starts an asynchronous job to detect medical conditions and link them to the ICD-10-CM ontology. Use the DescribeICD10CMInferenceJob operation to track the status of a job.

See also: AWS API Documentation

Request Syntax

response = client.start_icd10_cm_inference_job(
    InputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    OutputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    DataAccessRoleArn='string',
    JobName='string',
    ClientRequestToken='string',
    KMSKey='string',
    LanguageCode='en'
)
Parameters
  • InputDataConfig (dict) --

    [REQUIRED]

    Specifies the format and location of the input data for the job.

    • S3Bucket (string) -- [REQUIRED]

      The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

      Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

    • S3Key (string) --

      The path to the input data files in the S3 bucket.

  • OutputDataConfig (dict) --

    [REQUIRED]

    Specifies where to send the output files.

    • S3Bucket (string) -- [REQUIRED]

      When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

    • S3Key (string) --

      The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

  • DataAccessRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Comprehend Medical; read access to your input data. For more information, see Role-Based Permissions Required for Asynchronous Operations .

  • JobName (string) -- The identifier of the job.
  • ClientRequestToken (string) --

    A unique identifier for the request. If you don't set the client request token, Comprehend Medical; generates one.

    This field is autopopulated if not provided.

  • KMSKey (string) -- An AWS Key Management Service key to encrypt your output files. If you do not specify a key, the files are written in plain text.
  • LanguageCode (string) --

    [REQUIRED]

    The language of the input documents. All documents must be in the same language.

Return type

dict

Returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier generated for the job. To get the status of a job, use this identifier with the StartICD10CMInferenceJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
start_phi_detection_job(**kwargs)

Starts an asynchronous job to detect protected health information (PHI). Use the DescribePHIDetectionJob operation to track the status of a job.

See also: AWS API Documentation

Request Syntax

response = client.start_phi_detection_job(
    InputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    OutputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    DataAccessRoleArn='string',
    JobName='string',
    ClientRequestToken='string',
    KMSKey='string',
    LanguageCode='en'
)
Parameters
  • InputDataConfig (dict) --

    [REQUIRED]

    Specifies the format and location of the input data for the job.

    • S3Bucket (string) -- [REQUIRED]

      The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

      Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

    • S3Key (string) --

      The path to the input data files in the S3 bucket.

  • OutputDataConfig (dict) --

    [REQUIRED]

    Specifies where to send the output files.

    • S3Bucket (string) -- [REQUIRED]

      When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

    • S3Key (string) --

      The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

  • DataAccessRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Comprehend Medical; read access to your input data. For more information, see Role-Based Permissions Required for Asynchronous Operations .

  • JobName (string) -- The identifier of the job.
  • ClientRequestToken (string) --

    A unique identifier for the request. If you don't set the client request token, Comprehend Medical; generates one.

    This field is autopopulated if not provided.

  • KMSKey (string) -- An AWS Key Management Service key to encrypt your output files. If you do not specify a key, the files are written in plain text.
  • LanguageCode (string) --

    [REQUIRED]

    The language of the input documents. All documents must be in the same language.

Return type

dict

Returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier generated for the job. To get the status of a job, use this identifier with the DescribePHIDetectionJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
start_rx_norm_inference_job(**kwargs)

Starts an asynchronous job to detect medication entities and link them to the RxNorm ontology. Use the DescribeRxNormInferenceJob operation to track the status of a job.

See also: AWS API Documentation

Request Syntax

response = client.start_rx_norm_inference_job(
    InputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    OutputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    DataAccessRoleArn='string',
    JobName='string',
    ClientRequestToken='string',
    KMSKey='string',
    LanguageCode='en'
)
Parameters
  • InputDataConfig (dict) --

    [REQUIRED]

    Specifies the format and location of the input data for the job.

    • S3Bucket (string) -- [REQUIRED]

      The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

      Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

    • S3Key (string) --

      The path to the input data files in the S3 bucket.

  • OutputDataConfig (dict) --

    [REQUIRED]

    Specifies where to send the output files.

    • S3Bucket (string) -- [REQUIRED]

      When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

    • S3Key (string) --

      The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

  • DataAccessRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Comprehend Medical; read access to your input data. For more information, see Role-Based Permissions Required for Asynchronous Operations .

  • JobName (string) -- The identifier of the job.
  • ClientRequestToken (string) --

    A unique identifier for the request. If you don't set the client request token, Comprehend Medical; generates one.

    This field is autopopulated if not provided.

  • KMSKey (string) -- An AWS Key Management Service key to encrypt your output files. If you do not specify a key, the files are written in plain text.
  • LanguageCode (string) --

    [REQUIRED]

    The language of the input documents. All documents must be in the same language.

Return type

dict

Returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier of the job.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
start_snomedct_inference_job(**kwargs)

Starts an asynchronous job to detect medical concepts and link them to the SNOMED-CT ontology. Use the DescribeSNOMEDCTInferenceJob operation to track the status of a job.

See also: AWS API Documentation

Request Syntax

response = client.start_snomedct_inference_job(
    InputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    OutputDataConfig={
        'S3Bucket': 'string',
        'S3Key': 'string'
    },
    DataAccessRoleArn='string',
    JobName='string',
    ClientRequestToken='string',
    KMSKey='string',
    LanguageCode='en'
)
Parameters
  • InputDataConfig (dict) --

    [REQUIRED]

    The input properties for an entities detection job. This includes the name of the S3 bucket and the path to the files to be analyzed.

    • S3Bucket (string) -- [REQUIRED]

      The URI of the S3 bucket that contains the input data. The bucket must be in the same region as the API endpoint that you are calling.

      Each file in the document collection must be less than 40 KB. You can store a maximum of 30 GB in the bucket.

    • S3Key (string) --

      The path to the input data files in the S3 bucket.

  • OutputDataConfig (dict) --

    [REQUIRED]

    The output properties for a detection job.

    • S3Bucket (string) -- [REQUIRED]

      When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output.

    • S3Key (string) --

      The path to the output data files in the S3 bucket. Comprehend Medical; creates an output directory using the job ID so that the output from one job does not overwrite the output of another.

  • DataAccessRoleArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend Medical read access to your input data.

  • JobName (string) -- The user generated name the asynchronous InferSNOMEDCT job.
  • ClientRequestToken (string) --

    A unique identifier for the request. If you don't set the client request token, Amazon Comprehend Medical generates one.

    This field is autopopulated if not provided.

  • KMSKey (string) -- An AWS Key Management Service key used to encrypt your output files. If you do not specify a key, the files are written in plain text.
  • LanguageCode (string) --

    [REQUIRED]

    The language of the input documents. All documents must be in the same language.

Return type

dict

Returns

Response Syntax

{
    'JobId': 'string'
}

Response Structure

  • (dict) --

    • JobId (string) --

      The identifier generated for the job. To get the status of a job, use this identifier with the StartSNOMEDCTInferenceJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
stop_entities_detection_v2_job(**kwargs)

Stops a medical entities detection job in progress.

See also: AWS API Documentation

Request Syntax

response = client.stop_entities_detection_v2_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier of the medical entities job to stop.

Return type
dict
Returns
Response Syntax
{
    'JobId': 'string'
}

Response Structure

  • (dict) --
    • JobId (string) --

      The identifier of the medical entities detection job that was stopped.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
stop_icd10_cm_inference_job(**kwargs)

Stops an InferICD10CM inference job in progress.

See also: AWS API Documentation

Request Syntax

response = client.stop_icd10_cm_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier of the job.

Return type
dict
Returns
Response Syntax
{
    'JobId': 'string'
}

Response Structure

  • (dict) --
    • JobId (string) --

      The identifier generated for the job. To get the status of job, use this identifier with the DescribeICD10CMInferenceJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
stop_phi_detection_job(**kwargs)

Stops a protected health information (PHI) detection job in progress.

See also: AWS API Documentation

Request Syntax

response = client.stop_phi_detection_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier of the PHI detection job to stop.

Return type
dict
Returns
Response Syntax
{
    'JobId': 'string'
}

Response Structure

  • (dict) --
    • JobId (string) --

      The identifier of the PHI detection job that was stopped.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
stop_rx_norm_inference_job(**kwargs)

Stops an InferRxNorm inference job in progress.

See also: AWS API Documentation

Request Syntax

response = client.stop_rx_norm_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The identifier of the job.

Return type
dict
Returns
Response Syntax
{
    'JobId': 'string'
}

Response Structure

  • (dict) --
    • JobId (string) --

      The identifier generated for the job. To get the status of job, use this identifier with the DescribeRxNormInferenceJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.InternalServerException
stop_snomedct_inference_job(**kwargs)

Stops an InferSNOMEDCT inference job in progress.

See also: AWS API Documentation

Request Syntax

response = client.stop_snomedct_inference_job(
    JobId='string'
)
Parameters
JobId (string) --

[REQUIRED]

The job id of the asynchronous InferSNOMEDCT job to be stopped.

Return type
dict
Returns
Response Syntax
{
    'JobId': 'string'
}

Response Structure

  • (dict) --
    • JobId (string) --

      The identifier generated for the job. To get the status of job, use this identifier with the DescribeSNOMEDCTInferenceJob operation.

Exceptions

  • ComprehendMedical.Client.exceptions.InvalidRequestException
  • ComprehendMedical.Client.exceptions.ResourceNotFoundException
  • ComprehendMedical.Client.exceptions.TooManyRequestsException
  • ComprehendMedical.Client.exceptions.InternalServerException

Paginators

The available paginators are: