/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.comprehendmedical.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* 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. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ICD10CMEntity implements Serializable, Cloneable, StructuredPojo { /** ** The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather * than a global unique identifier. *
*/ private Integer id; /** ** The segment of input text that is matched to the detected entity. *
*/ private String text; /** *
* The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION
category.
*
* Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type
* DX_NAME
and TIME_EXPRESSION
.
*
* The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. *
*/ private Float score; /** ** 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. *
*/ private Integer beginOffset; /** ** 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. *
*/ private Integer endOffset; /** ** 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. *
*/ private java.util.List
* Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS
,
* SIGN
, SYMPTOM
, and NEGATION.
*
* The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match. *
*/ private java.util.List* The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather * than a global unique identifier. *
* * @param id * The numeric identifier for the entity. This is a monotonically increasing id unique within this response * rather than a global unique identifier. */ public void setId(Integer id) { this.id = id; } /** ** The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather * than a global unique identifier. *
* * @return The numeric identifier for the entity. This is a monotonically increasing id unique within this response * rather than a global unique identifier. */ public Integer getId() { return this.id; } /** ** The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather * than a global unique identifier. *
* * @param id * The numeric identifier for the entity. This is a monotonically increasing id unique within this response * rather than a global unique identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withId(Integer id) { setId(id); return this; } /** ** The segment of input text that is matched to the detected entity. *
* * @param text * The segment of input text that is matched to the detected entity. */ public void setText(String text) { this.text = text; } /** ** The segment of input text that is matched to the detected entity. *
* * @return The segment of input text that is matched to the detected entity. */ public String getText() { return this.text; } /** ** The segment of input text that is matched to the detected entity. *
* * @param text * The segment of input text that is matched to the detected entity. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withText(String text) { setText(text); return this; } /** *
* The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION
category.
*
MEDICAL_CONDITION
category.
* @see ICD10CMEntityCategory
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION
category.
*
MEDICAL_CONDITION
category.
* @see ICD10CMEntityCategory
*/
public String getCategory() {
return this.category;
}
/**
*
* The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION
category.
*
MEDICAL_CONDITION
category.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ICD10CMEntityCategory
*/
public ICD10CMEntity withCategory(String category) {
setCategory(category);
return this;
}
/**
*
* The category of the entity. InferICD10CM detects entities in the MEDICAL_CONDITION
category.
*
MEDICAL_CONDITION
category.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ICD10CMEntityCategory
*/
public ICD10CMEntity withCategory(ICD10CMEntityCategory category) {
this.category = category.toString();
return this;
}
/**
*
* Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type
* DX_NAME
and TIME_EXPRESSION
.
*
DX_NAME
and TIME_EXPRESSION
.
* @see ICD10CMEntityType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type
* DX_NAME
and TIME_EXPRESSION
.
*
DX_NAME
and TIME_EXPRESSION
.
* @see ICD10CMEntityType
*/
public String getType() {
return this.type;
}
/**
*
* Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type
* DX_NAME
and TIME_EXPRESSION
.
*
DX_NAME
and TIME_EXPRESSION
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ICD10CMEntityType
*/
public ICD10CMEntity withType(String type) {
setType(type);
return this;
}
/**
*
* Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type
* DX_NAME
and TIME_EXPRESSION
.
*
DX_NAME
and TIME_EXPRESSION
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ICD10CMEntityType
*/
public ICD10CMEntity withType(ICD10CMEntityType type) {
this.type = type.toString();
return this;
}
/**
* * The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. *
* * @param score * The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. */ public void setScore(Float score) { this.score = score; } /** ** The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. *
* * @return The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. */ public Float getScore() { return this.score; } /** ** The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. *
* * @param score * The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withScore(Float score) { setScore(score); return this; } /** ** 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. *
* * @param beginOffset * 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. */ public void setBeginOffset(Integer beginOffset) { this.beginOffset = beginOffset; } /** ** 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. *
* * @return 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. */ public Integer getBeginOffset() { return this.beginOffset; } /** ** 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. *
* * @param beginOffset * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withBeginOffset(Integer beginOffset) { setBeginOffset(beginOffset); return this; } /** ** 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. *
* * @param endOffset * 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. */ public void setEndOffset(Integer endOffset) { this.endOffset = endOffset; } /** ** 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. *
* * @return 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. */ public Integer getEndOffset() { return this.endOffset; } /** ** 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. *
* * @param endOffset * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withEndOffset(Integer endOffset) { setEndOffset(endOffset); return this; } /** ** 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. *
* * @return 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. */ public java.util.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. *
* * @param attributes * 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. */ public void setAttributes(java.util.Collection* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttributes(java.util.Collection)} or {@link #withAttributes(java.util.Collection)} if you want to * override the existing values. *
* * @param attributes * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withAttributes(ICD10CMAttribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList* 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. *
* * @param attributes * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withAttributes(java.util.Collection
* Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS
,
* SIGN
, SYMPTOM
, and NEGATION.
*
DIAGNOSIS
, SIGN
, SYMPTOM
, and NEGATION.
*/
public java.util.List
* Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS
,
* SIGN
, SYMPTOM
, and NEGATION.
*
DIAGNOSIS
, SIGN
, SYMPTOM
, and NEGATION.
*/
public void setTraits(java.util.Collection
* Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS
,
* SIGN
, SYMPTOM
, and NEGATION.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTraits(java.util.Collection)} or {@link #withTraits(java.util.Collection)} if you want to override the * existing values. *
* * @param traits * Provides Contextual information for the entity. The traits recognized by InferICD10CM are *DIAGNOSIS
, SIGN
, SYMPTOM
, and NEGATION.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ICD10CMEntity withTraits(ICD10CMTrait... traits) {
if (this.traits == null) {
setTraits(new java.util.ArrayList
* Provides Contextual information for the entity. The traits recognized by InferICD10CM are DIAGNOSIS
,
* SIGN
, SYMPTOM
, and NEGATION.
*
DIAGNOSIS
, SIGN
, SYMPTOM
, and NEGATION.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ICD10CMEntity withTraits(java.util.Collection* The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match. *
* * @return The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of * the match. */ public java.util.List* The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match. *
* * @param iCD10CMConcepts * The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the * match. */ public void setICD10CMConcepts(java.util.Collection* The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setICD10CMConcepts(java.util.Collection)} or {@link #withICD10CMConcepts(java.util.Collection)} if you * want to override the existing values. *
* * @param iCD10CMConcepts * The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the * match. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withICD10CMConcepts(ICD10CMConcept... iCD10CMConcepts) { if (this.iCD10CMConcepts == null) { setICD10CMConcepts(new java.util.ArrayList* The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match. *
* * @param iCD10CMConcepts * The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the * match. * @return Returns a reference to this object so that method calls can be chained together. */ public ICD10CMEntity withICD10CMConcepts(java.util.Collection