ComprehendMedical / Client / infer_icd10_cm
infer_icd10_cm#
- ComprehendMedical.Client.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.
- 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'|'PERTAINS_TO_FAMILY'|'HYPOTHETICAL'|'LOW_CONFIDENCE', 'Score': ... }, ], 'Category': 'DX_NAME'|'TIME_EXPRESSION', 'RelationshipType': 'OVERLAP'|'SYSTEM_ORGAN_SITE'|'QUALITY' }, ], 'Traits': [ { 'Name': 'NEGATION'|'DIAGNOSIS'|'SIGN'|'SYMPTOM'|'PERTAINS_TO_FAMILY'|'HYPOTHETICAL'|'LOW_CONFIDENCE', '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
andTIME_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
, andAcuity
.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
, andNEGATION
.(dict) –
Contextual information for the entity. The traits recognized by InferICD10CM are
DIAGNOSIS
,SIGN
,SYMPTOM
, andNEGATION
.Name (string) –
Provides a name or contextual description about the trait.
Score (float) –
The level of confidence that Amazon 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
orTIME_EXPRESSION
.RelationshipType (string) –
The type of relationship between the entity and attribute. Type for the relationship can be either of
OVERLAP
orSYSTEM_ORGAN_SITE
.
Traits (list) –
Provides Contextual information for the entity. The traits recognized by InferICD10CM are
DIAGNOSIS
,SIGN
,SYMPTOM
, andNEGATION.
(dict) –
Contextual information for the entity. The traits recognized by InferICD10CM are
DIAGNOSIS
,SIGN
,SYMPTOM
, andNEGATION
.Name (string) –
Provides a name or contextual description about the trait.
Score (float) –
The level of confidence that Amazon 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 thePaginationToken
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