Documentation ¶
Overview ¶
Package comprehendmedical provides the client and types for making API requests to ComprehendMedical.
Comprehend Medical extracts structured information from unstructured clinical text. Use these actions to gain insight in your documents.
See https://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30 for more information on this service.
See comprehendmedical package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/comprehendmedical/
Using the Client ¶
To use ComprehendMedical with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the ComprehendMedical client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/comprehendmedical/#New
Index ¶
- Constants
- type Attribute
- type AttributeName
- type Client
- type DetectEntitiesInput
- type DetectEntitiesOutput
- type DetectEntitiesRequest
- type DetectEntitiesResponse
- type DetectPHIInput
- type DetectPHIOutput
- type DetectPHIRequest
- type DetectPHIResponse
- type Entity
- type EntitySubType
- type EntityType
- type Trait
- type UnmappedAttribute
Constants ¶
const ( ServiceName = "ComprehendMedical" // Service's name ServiceID = "ComprehendMedical" // Service's identifier EndpointsID = "comprehendmedical" // Service's Endpoint identifier )
const ( // ErrCodeInternalServerException for service response error code // "InternalServerException". // // An internal server error occurred. Retry your request. ErrCodeInternalServerException = "InternalServerException" // ErrCodeInvalidEncodingException for service response error code // "InvalidEncodingException". // // The input text was not in valid UTF-8 character encoding. Check your text // then retry your request. ErrCodeInvalidEncodingException = "InvalidEncodingException" // ErrCodeInvalidRequestException for service response error code // "InvalidRequestException". // // The request that you made is invalid. Check your request to determine why // it's invalid and then retry the request. ErrCodeInvalidRequestException = "InvalidRequestException" // "ServiceUnavailableException". // // The Comprehend Medical service is temporarily unavailable. Please wait and // then retry your request. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeTextSizeLimitExceededException for service response error code // "TextSizeLimitExceededException". // // The size of the text you submitted exceeds the size limit. Reduce the size // of the text or use a smaller document and then retry your request. ErrCodeTextSizeLimitExceededException = "TextSizeLimitExceededException" // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". // // You have made too many requests within a short period of time. Wait for a // short time and then try your request again. Contact customer support for // more information about a service limit increase. ErrCodeTooManyRequestsException = "TooManyRequestsException" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { // 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. BeginOffset *int64 `type:"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. EndOffset *int64 `type:"integer"` // The numeric identifier for this attribute. This is a monotonically increasing // id unique within this response rather than a global unique identifier. Id *int64 `type:"integer"` // The level of confidence that Comprehend Medical has that this attribute is // correctly related to this entity. RelationshipScore *float64 `type:"float"` // The level of confidence that Comprehend Medical has that the segment of text // is correctly recognized as an attribute. Score *float64 `type:"float"` // The segment of input text extracted as this attribute. Text *string `min:"1" type:"string"` // Contextual information for this attribute. Traits []Trait `type:"list"` // The type of attribute. Type EntitySubType `type:"string" enum:"true"` // contains filtered or unexported fields }
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 AttributeName ¶
type AttributeName string
const ( AttributeNameSign AttributeName = "SIGN" AttributeNameSymptom AttributeName = "SYMPTOM" AttributeNameDiagnosis AttributeName = "DIAGNOSIS" AttributeNameNegation AttributeName = "NEGATION" )
Enum values for AttributeName
func (AttributeName) MarshalValue ¶
func (enum AttributeName) MarshalValue() (string, error)
func (AttributeName) MarshalValueBuf ¶
func (enum AttributeName) MarshalValueBuf(b []byte) ([]byte, error)
type Client ¶ added in v0.9.0
Client provides the API operation methods for making requests to ComprehendMedical. See this package's package overview docs for details on the service.
The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
New creates a new instance of the client from the provided Config.
Example:
// Create a client from just a config. svc := comprehendmedical.New(myConfig)
func (*Client) DetectEntitiesRequest ¶ added in v0.9.0
func (c *Client) DetectEntitiesRequest(input *DetectEntitiesInput) DetectEntitiesRequest
DetectEntitiesRequest returns a request value for making API operation for AWS Comprehend Medical.
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 .
// Example sending a request using DetectEntitiesRequest. req := client.DetectEntitiesRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectEntities
func (*Client) DetectPHIRequest ¶ added in v0.9.0
func (c *Client) DetectPHIRequest(input *DetectPHIInput) DetectPHIRequest
DetectPHIRequest returns a request value for making API operation for AWS Comprehend Medical.
Inspects the clinical text for personal health information (PHI) entities and entity category, location, and confidence score on that information.
// Example sending a request using DetectPHIRequest. req := client.DetectPHIRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectPHI
type DetectEntitiesInput ¶
type DetectEntitiesInput struct { // A UTF-8 text string containing the clinical content being examined for entities. // Each string must contain fewer than 20,000 bytes of characters. // // Text is a required field Text *string `min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DetectEntitiesInput) String ¶
func (s DetectEntitiesInput) String() string
String returns the string representation
func (*DetectEntitiesInput) Validate ¶
func (s *DetectEntitiesInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DetectEntitiesOutput ¶
type DetectEntitiesOutput struct { // 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. // // Entities is a required field Entities []Entity `type:"list" required:"true"` // If the result of the previous request to DetectEntities was truncated, include // the Paginationtoken to fetch the next page of entities. PaginationToken *string `min:"1" type:"string"` // Attributes extracted from the input text that we were unable to relate to // an entity. UnmappedAttributes []UnmappedAttribute `type:"list"` // contains filtered or unexported fields }
func (DetectEntitiesOutput) String ¶
func (s DetectEntitiesOutput) String() string
String returns the string representation
type DetectEntitiesRequest ¶
type DetectEntitiesRequest struct { *aws.Request Input *DetectEntitiesInput Copy func(*DetectEntitiesInput) DetectEntitiesRequest }
DetectEntitiesRequest is the request type for the DetectEntities API operation.
func (DetectEntitiesRequest) Send ¶
func (r DetectEntitiesRequest) Send(ctx context.Context) (*DetectEntitiesResponse, error)
Send marshals and sends the DetectEntities API request.
type DetectEntitiesResponse ¶ added in v0.9.0
type DetectEntitiesResponse struct { *DetectEntitiesOutput // contains filtered or unexported fields }
DetectEntitiesResponse is the response type for the DetectEntities API operation.
func (*DetectEntitiesResponse) SDKResponseMetdata ¶ added in v0.9.0
func (r *DetectEntitiesResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the DetectEntities request.
type DetectPHIInput ¶
type DetectPHIInput struct { // 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. // // Text is a required field Text *string `min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
func (DetectPHIInput) String ¶
func (s DetectPHIInput) String() string
String returns the string representation
func (*DetectPHIInput) Validate ¶
func (s *DetectPHIInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DetectPHIOutput ¶
type DetectPHIOutput struct { // 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. // // Entities is a required field Entities []Entity `type:"list" required:"true"` // If the result of the previous request to DetectPHI was truncated, include // the Paginationtoken to fetch the next page of PHI entities. PaginationToken *string `min:"1" type:"string"` // contains filtered or unexported fields }
func (DetectPHIOutput) String ¶
func (s DetectPHIOutput) String() string
String returns the string representation
type DetectPHIRequest ¶
type DetectPHIRequest struct { *aws.Request Input *DetectPHIInput Copy func(*DetectPHIInput) DetectPHIRequest }
DetectPHIRequest is the request type for the DetectPHI API operation.
func (DetectPHIRequest) Send ¶
func (r DetectPHIRequest) Send(ctx context.Context) (*DetectPHIResponse, error)
Send marshals and sends the DetectPHI API request.
type DetectPHIResponse ¶ added in v0.9.0
type DetectPHIResponse struct { *DetectPHIOutput // contains filtered or unexported fields }
DetectPHIResponse is the response type for the DetectPHI API operation.
func (*DetectPHIResponse) SDKResponseMetdata ¶ added in v0.9.0
func (r *DetectPHIResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the DetectPHI request.
type Entity ¶
type Entity struct { // The extracted attributes that relate to this entity. Attributes []Attribute `type:"list"` // 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. BeginOffset *int64 `type:"integer"` // The category of the entity. Category EntityType `type:"string" enum:"true"` // 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. EndOffset *int64 `type:"integer"` // The numeric identifier for the entity. This is a monotonically increasing // id unique within this response rather than a global unique identifier. Id *int64 `type:"integer"` // The level of confidence that Comprehend Medical has in the accuracy of the // detection. Score *float64 `type:"float"` // The segment of input text extracted as this entity. Text *string `min:"1" type:"string"` // Contextual information for the entity Traits []Trait `type:"list"` // Describes the specific type of entity with category of entities. Type EntitySubType `type:"string" enum:"true"` // contains filtered or unexported fields }
Provides information about an extracted medical entity.
type EntitySubType ¶
type EntitySubType string
const ( EntitySubTypeName EntitySubType = "NAME" EntitySubTypeDosage EntitySubType = "DOSAGE" EntitySubTypeRouteOrMode EntitySubType = "ROUTE_OR_MODE" EntitySubTypeForm EntitySubType = "FORM" EntitySubTypeFrequency EntitySubType = "FREQUENCY" EntitySubTypeDuration EntitySubType = "DURATION" EntitySubTypeGenericName EntitySubType = "GENERIC_NAME" EntitySubTypeBrandName EntitySubType = "BRAND_NAME" EntitySubTypeStrength EntitySubType = "STRENGTH" EntitySubTypeRate EntitySubType = "RATE" EntitySubTypeAcuity EntitySubType = "ACUITY" EntitySubTypeTestName EntitySubType = "TEST_NAME" EntitySubTypeTestValue EntitySubType = "TEST_VALUE" EntitySubTypeTestUnits EntitySubType = "TEST_UNITS" EntitySubTypeProcedureName EntitySubType = "PROCEDURE_NAME" EntitySubTypeTreatmentName EntitySubType = "TREATMENT_NAME" EntitySubTypeDate EntitySubType = "DATE" EntitySubTypeAge EntitySubType = "AGE" EntitySubTypeContactPoint EntitySubType = "CONTACT_POINT" EntitySubTypeEmail EntitySubType = "EMAIL" EntitySubTypeIdentifier EntitySubType = "IDENTIFIER" EntitySubTypeUrl EntitySubType = "URL" EntitySubTypeAddress EntitySubType = "ADDRESS" EntitySubTypeProfession EntitySubType = "PROFESSION" EntitySubTypeSystemOrganSite EntitySubType = "SYSTEM_ORGAN_SITE" EntitySubTypeDirection EntitySubType = "DIRECTION" EntitySubTypeQuality EntitySubType = "QUALITY" EntitySubTypeQuantity EntitySubType = "QUANTITY" )
Enum values for EntitySubType
func (EntitySubType) MarshalValue ¶
func (enum EntitySubType) MarshalValue() (string, error)
func (EntitySubType) MarshalValueBuf ¶
func (enum EntitySubType) MarshalValueBuf(b []byte) ([]byte, error)
type EntityType ¶
type EntityType string
const ( EntityTypeMedication EntityType = "MEDICATION" EntityTypeMedicalCondition EntityType = "MEDICAL_CONDITION" EntityTypeProtectedHealthInformation EntityType = "PROTECTED_HEALTH_INFORMATION" EntityTypeTestTreatmentProcedure EntityType = "TEST_TREATMENT_PROCEDURE" EntityTypeAnatomy EntityType = "ANATOMY" )
Enum values for EntityType
func (EntityType) MarshalValue ¶
func (enum EntityType) MarshalValue() (string, error)
func (EntityType) MarshalValueBuf ¶
func (enum EntityType) MarshalValueBuf(b []byte) ([]byte, error)
type Trait ¶
type Trait struct { // Provides a name or contextual description about the trait. Name AttributeName `type:"string" enum:"true"` // The level of confidence that Comprehend Medical has in the accuracy of this // trait. Score *float64 `type:"float"` // contains filtered or unexported fields }
Provides contextual information about the extracted entity.
type UnmappedAttribute ¶
type UnmappedAttribute struct { // The specific attribute that has been extracted but not mapped to an entity. Attribute *Attribute `type:"structure"` // The type of the attribute, could be one of the following values: "MEDICATION", // "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PERSONAL_HEALTH_INFORMATION". Type EntityType `type:"string" enum:"true"` // contains filtered or unexported fields }
An attribute that we extracted, but were unable to relate to an entity.
func (UnmappedAttribute) String ¶
func (s UnmappedAttribute) String() string
String returns the string representation
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package comprehendmedicaliface provides an interface to enable mocking the AWS Comprehend Medical service client for testing your code.
|
Package comprehendmedicaliface provides an interface to enable mocking the AWS Comprehend Medical service client for testing your code. |