aws-sdk-comprehendmedical 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-comprehendmedical.rb +47 -0
- data/lib/aws-sdk-comprehendmedical/client.rb +376 -0
- data/lib/aws-sdk-comprehendmedical/client_api.rb +142 -0
- data/lib/aws-sdk-comprehendmedical/customizations.rb +0 -0
- data/lib/aws-sdk-comprehendmedical/errors.rb +14 -0
- data/lib/aws-sdk-comprehendmedical/resource.rb +23 -0
- data/lib/aws-sdk-comprehendmedical/types.rb +263 -0
- metadata +88 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 89c3a50e8efdcee880e09f09dc7129657b7ebdad
|
4
|
+
data.tar.gz: e6fef0c38d6b589cb3e0def5c6ed8cb7c608c273
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cafde98c1ba7320b3438fddf659c6c9bb1614b0aca766738b1641eb8984e0fbfa002ddd1c85c90a45033e0b9ad06bbc8392a84aad6d46110b3ab0a17c059efb0
|
7
|
+
data.tar.gz: 5ad499591f5c13ed803990b5123ab78489ad911691cd7279b757c459db0d9b6fd92a1add7624f56edf0c90d1c36f100827af72340807dd4ec9f8fc23f289f8fb
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-comprehendmedical/types'
|
12
|
+
require_relative 'aws-sdk-comprehendmedical/client_api'
|
13
|
+
require_relative 'aws-sdk-comprehendmedical/client'
|
14
|
+
require_relative 'aws-sdk-comprehendmedical/errors'
|
15
|
+
require_relative 'aws-sdk-comprehendmedical/resource'
|
16
|
+
require_relative 'aws-sdk-comprehendmedical/customizations'
|
17
|
+
|
18
|
+
# This module provides support for AWS Comprehend Medical. This module is available in the
|
19
|
+
# `aws-sdk-comprehendmedical` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from AWS Comprehend Medical all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::ComprehendMedical::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::ComprehendMedical
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,376 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
27
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
28
|
+
|
29
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:comprehendmedical)
|
30
|
+
|
31
|
+
module Aws::ComprehendMedical
|
32
|
+
class Client < Seahorse::Client::Base
|
33
|
+
|
34
|
+
include Aws::ClientStubs
|
35
|
+
|
36
|
+
@identifier = :comprehendmedical
|
37
|
+
|
38
|
+
set_api(ClientApi::API)
|
39
|
+
|
40
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
41
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
42
|
+
add_plugin(Aws::Plugins::Logging)
|
43
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
44
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
45
|
+
add_plugin(Aws::Plugins::UserAgent)
|
46
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
47
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
48
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
49
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
50
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
51
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
52
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
53
|
+
add_plugin(Aws::Plugins::StubResponses)
|
54
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
55
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
56
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
57
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
58
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
59
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
60
|
+
|
61
|
+
# @overload initialize(options)
|
62
|
+
# @param [Hash] options
|
63
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
64
|
+
# Your AWS credentials. This can be an instance of any one of the
|
65
|
+
# following classes:
|
66
|
+
#
|
67
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
68
|
+
# credentials.
|
69
|
+
#
|
70
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
71
|
+
# from an EC2 IMDS on an EC2 instance.
|
72
|
+
#
|
73
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
74
|
+
# shared file, such as `~/.aws/config`.
|
75
|
+
#
|
76
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
77
|
+
#
|
78
|
+
# When `:credentials` are not configured directly, the following
|
79
|
+
# locations will be searched for credentials:
|
80
|
+
#
|
81
|
+
# * `Aws.config[:credentials]`
|
82
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
83
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
84
|
+
# * `~/.aws/credentials`
|
85
|
+
# * `~/.aws/config`
|
86
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
87
|
+
# very aggressive. Construct and pass an instance of
|
88
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
89
|
+
# timeouts.
|
90
|
+
#
|
91
|
+
# @option options [required, String] :region
|
92
|
+
# The AWS region to connect to. The configured `:region` is
|
93
|
+
# used to determine the service `:endpoint`. When not passed,
|
94
|
+
# a default `:region` is search for in the following locations:
|
95
|
+
#
|
96
|
+
# * `Aws.config[:region]`
|
97
|
+
# * `ENV['AWS_REGION']`
|
98
|
+
# * `ENV['AMAZON_REGION']`
|
99
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
100
|
+
# * `~/.aws/credentials`
|
101
|
+
# * `~/.aws/config`
|
102
|
+
#
|
103
|
+
# @option options [String] :access_key_id
|
104
|
+
#
|
105
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
106
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
107
|
+
# the background every 60 secs (default). Defaults to `false`.
|
108
|
+
#
|
109
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
110
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
111
|
+
# this client.
|
112
|
+
#
|
113
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
114
|
+
# Allows you to provide an identifier for this client which will be attached to
|
115
|
+
# all generated client side metrics. Defaults to an empty string.
|
116
|
+
#
|
117
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
118
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
119
|
+
# agent is running on, where client metrics will be published via UDP.
|
120
|
+
#
|
121
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
122
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
123
|
+
# will use the Client Side Monitoring Agent Publisher.
|
124
|
+
#
|
125
|
+
# @option options [Boolean] :convert_params (true)
|
126
|
+
# When `true`, an attempt is made to coerce request parameters into
|
127
|
+
# the required types.
|
128
|
+
#
|
129
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
130
|
+
# Set to true to disable SDK automatically adding host prefix
|
131
|
+
# to default service endpoint when available.
|
132
|
+
#
|
133
|
+
# @option options [String] :endpoint
|
134
|
+
# The client endpoint is normally constructed from the `:region`
|
135
|
+
# option. You should only configure an `:endpoint` when connecting
|
136
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
137
|
+
#
|
138
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
139
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
140
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
141
|
+
#
|
142
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
143
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
144
|
+
#
|
145
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
146
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
147
|
+
# Use this option to config the time interval in seconds for making
|
148
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
149
|
+
#
|
150
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
151
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
152
|
+
#
|
153
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
154
|
+
# The log formatter.
|
155
|
+
#
|
156
|
+
# @option options [Symbol] :log_level (:info)
|
157
|
+
# The log level to send messages to the `:logger` at.
|
158
|
+
#
|
159
|
+
# @option options [Logger] :logger
|
160
|
+
# The Logger instance to send log messages to. If this option
|
161
|
+
# is not set, logging will be disabled.
|
162
|
+
#
|
163
|
+
# @option options [String] :profile ("default")
|
164
|
+
# Used when loading credentials from the shared credentials file
|
165
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
166
|
+
#
|
167
|
+
# @option options [Float] :retry_base_delay (0.3)
|
168
|
+
# The base delay in seconds used by the default backoff function.
|
169
|
+
#
|
170
|
+
# @option options [Symbol] :retry_jitter (:none)
|
171
|
+
# A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
|
172
|
+
#
|
173
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
174
|
+
#
|
175
|
+
# @option options [Integer] :retry_limit (3)
|
176
|
+
# The maximum number of times to retry failed requests. Only
|
177
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
178
|
+
# are retried. Generally, these are throttling errors, data
|
179
|
+
# checksum errors, networking errors, timeout errors and auth
|
180
|
+
# errors from expired credentials.
|
181
|
+
#
|
182
|
+
# @option options [Integer] :retry_max_delay (0)
|
183
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
184
|
+
#
|
185
|
+
# @option options [String] :secret_access_key
|
186
|
+
#
|
187
|
+
# @option options [String] :session_token
|
188
|
+
#
|
189
|
+
# @option options [Boolean] :simple_json (false)
|
190
|
+
# Disables request parameter conversion, validation, and formatting.
|
191
|
+
# Also disable response data type conversions. This option is useful
|
192
|
+
# when you want to ensure the highest level of performance by
|
193
|
+
# avoiding overhead of walking request parameters and response data
|
194
|
+
# structures.
|
195
|
+
#
|
196
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
197
|
+
# be formatted exactly as the DynamoDB API expects.
|
198
|
+
#
|
199
|
+
# @option options [Boolean] :stub_responses (false)
|
200
|
+
# Causes the client to return stubbed responses. By default
|
201
|
+
# fake responses are generated and returned. You can specify
|
202
|
+
# the response data to return or errors to raise by calling
|
203
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
204
|
+
#
|
205
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
206
|
+
# requests are made, and retries are disabled.
|
207
|
+
#
|
208
|
+
# @option options [Boolean] :validate_params (true)
|
209
|
+
# When `true`, request parameters are validated before
|
210
|
+
# sending the request.
|
211
|
+
#
|
212
|
+
def initialize(*args)
|
213
|
+
super
|
214
|
+
end
|
215
|
+
|
216
|
+
# @!group API Operations
|
217
|
+
|
218
|
+
# Inspects the clinical text for a variety of medical entities and
|
219
|
+
# returns specific information about them such as entity category,
|
220
|
+
# location, and confidence score on that information .
|
221
|
+
#
|
222
|
+
# @option params [required, String] :text
|
223
|
+
# A UTF-8 text string containing the clinical content being examined for
|
224
|
+
# entities. Each string must contain fewer than 20,000 bytes of
|
225
|
+
# characters.
|
226
|
+
#
|
227
|
+
# @return [Types::DetectEntitiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
228
|
+
#
|
229
|
+
# * {Types::DetectEntitiesResponse#entities #entities} => Array<Types::Entity>
|
230
|
+
# * {Types::DetectEntitiesResponse#unmapped_attributes #unmapped_attributes} => Array<Types::UnmappedAttribute>
|
231
|
+
# * {Types::DetectEntitiesResponse#pagination_token #pagination_token} => String
|
232
|
+
#
|
233
|
+
# @example Request syntax with placeholder values
|
234
|
+
#
|
235
|
+
# resp = client.detect_entities({
|
236
|
+
# text: "BoundedLengthString", # required
|
237
|
+
# })
|
238
|
+
#
|
239
|
+
# @example Response structure
|
240
|
+
#
|
241
|
+
# resp.entities #=> Array
|
242
|
+
# resp.entities[0].id #=> Integer
|
243
|
+
# resp.entities[0].begin_offset #=> Integer
|
244
|
+
# resp.entities[0].end_offset #=> Integer
|
245
|
+
# resp.entities[0].score #=> Float
|
246
|
+
# resp.entities[0].text #=> String
|
247
|
+
# resp.entities[0].category #=> String, one of "MEDICATION", "MEDICAL_CONDITION", "PROTECTED_HEALTH_INFORMATION", "TEST_TREATMENT_PROCEDURE", "ANATOMY"
|
248
|
+
# resp.entities[0].type #=> String, one of "NAME", "DOSAGE", "ROUTE_OR_MODE", "FORM", "FREQUENCY", "DURATION", "GENERIC_NAME", "BRAND_NAME", "STRENGTH", "RATE", "ACUITY", "TEST_NAME", "TEST_VALUE", "TEST_UNITS", "PROCEDURE_NAME", "TREATMENT_NAME", "DATE", "AGE", "CONTACT_POINT", "EMAIL", "IDENTIFIER", "URL", "ADDRESS", "PROFESSION", "SYSTEM_ORGAN_SITE", "DIRECTION", "QUALITY", "QUANTITY"
|
249
|
+
# resp.entities[0].traits #=> Array
|
250
|
+
# resp.entities[0].traits[0].name #=> String, one of "SIGN", "SYMPTOM", "DIAGNOSIS", "NEGATION"
|
251
|
+
# resp.entities[0].traits[0].score #=> Float
|
252
|
+
# resp.entities[0].attributes #=> Array
|
253
|
+
# resp.entities[0].attributes[0].type #=> String, one of "NAME", "DOSAGE", "ROUTE_OR_MODE", "FORM", "FREQUENCY", "DURATION", "GENERIC_NAME", "BRAND_NAME", "STRENGTH", "RATE", "ACUITY", "TEST_NAME", "TEST_VALUE", "TEST_UNITS", "PROCEDURE_NAME", "TREATMENT_NAME", "DATE", "AGE", "CONTACT_POINT", "EMAIL", "IDENTIFIER", "URL", "ADDRESS", "PROFESSION", "SYSTEM_ORGAN_SITE", "DIRECTION", "QUALITY", "QUANTITY"
|
254
|
+
# resp.entities[0].attributes[0].score #=> Float
|
255
|
+
# resp.entities[0].attributes[0].relationship_score #=> Float
|
256
|
+
# resp.entities[0].attributes[0].id #=> Integer
|
257
|
+
# resp.entities[0].attributes[0].begin_offset #=> Integer
|
258
|
+
# resp.entities[0].attributes[0].end_offset #=> Integer
|
259
|
+
# resp.entities[0].attributes[0].text #=> String
|
260
|
+
# resp.entities[0].attributes[0].traits #=> Array
|
261
|
+
# resp.entities[0].attributes[0].traits[0].name #=> String, one of "SIGN", "SYMPTOM", "DIAGNOSIS", "NEGATION"
|
262
|
+
# resp.entities[0].attributes[0].traits[0].score #=> Float
|
263
|
+
# resp.unmapped_attributes #=> Array
|
264
|
+
# resp.unmapped_attributes[0].type #=> String, one of "MEDICATION", "MEDICAL_CONDITION", "PROTECTED_HEALTH_INFORMATION", "TEST_TREATMENT_PROCEDURE", "ANATOMY"
|
265
|
+
# resp.unmapped_attributes[0].attribute.type #=> String, one of "NAME", "DOSAGE", "ROUTE_OR_MODE", "FORM", "FREQUENCY", "DURATION", "GENERIC_NAME", "BRAND_NAME", "STRENGTH", "RATE", "ACUITY", "TEST_NAME", "TEST_VALUE", "TEST_UNITS", "PROCEDURE_NAME", "TREATMENT_NAME", "DATE", "AGE", "CONTACT_POINT", "EMAIL", "IDENTIFIER", "URL", "ADDRESS", "PROFESSION", "SYSTEM_ORGAN_SITE", "DIRECTION", "QUALITY", "QUANTITY"
|
266
|
+
# resp.unmapped_attributes[0].attribute.score #=> Float
|
267
|
+
# resp.unmapped_attributes[0].attribute.relationship_score #=> Float
|
268
|
+
# resp.unmapped_attributes[0].attribute.id #=> Integer
|
269
|
+
# resp.unmapped_attributes[0].attribute.begin_offset #=> Integer
|
270
|
+
# resp.unmapped_attributes[0].attribute.end_offset #=> Integer
|
271
|
+
# resp.unmapped_attributes[0].attribute.text #=> String
|
272
|
+
# resp.unmapped_attributes[0].attribute.traits #=> Array
|
273
|
+
# resp.unmapped_attributes[0].attribute.traits[0].name #=> String, one of "SIGN", "SYMPTOM", "DIAGNOSIS", "NEGATION"
|
274
|
+
# resp.unmapped_attributes[0].attribute.traits[0].score #=> Float
|
275
|
+
# resp.pagination_token #=> String
|
276
|
+
#
|
277
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectEntities AWS API Documentation
|
278
|
+
#
|
279
|
+
# @overload detect_entities(params = {})
|
280
|
+
# @param [Hash] params ({})
|
281
|
+
def detect_entities(params = {}, options = {})
|
282
|
+
req = build_request(:detect_entities, params)
|
283
|
+
req.send_request(options)
|
284
|
+
end
|
285
|
+
|
286
|
+
# Inspects the clinical text for personal health information (PHI)
|
287
|
+
# entities and entity category, location, and confidence score on that
|
288
|
+
# information.
|
289
|
+
#
|
290
|
+
# @option params [required, String] :text
|
291
|
+
# A UTF-8 text string containing the clinical content being examined for
|
292
|
+
# PHI entities. Each string must contain fewer than 20,000 bytes of
|
293
|
+
# characters.
|
294
|
+
#
|
295
|
+
# @return [Types::DetectPHIResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
296
|
+
#
|
297
|
+
# * {Types::DetectPHIResponse#entities #entities} => Array<Types::Entity>
|
298
|
+
# * {Types::DetectPHIResponse#pagination_token #pagination_token} => String
|
299
|
+
#
|
300
|
+
# @example Request syntax with placeholder values
|
301
|
+
#
|
302
|
+
# resp = client.detect_phi({
|
303
|
+
# text: "BoundedLengthString", # required
|
304
|
+
# })
|
305
|
+
#
|
306
|
+
# @example Response structure
|
307
|
+
#
|
308
|
+
# resp.entities #=> Array
|
309
|
+
# resp.entities[0].id #=> Integer
|
310
|
+
# resp.entities[0].begin_offset #=> Integer
|
311
|
+
# resp.entities[0].end_offset #=> Integer
|
312
|
+
# resp.entities[0].score #=> Float
|
313
|
+
# resp.entities[0].text #=> String
|
314
|
+
# resp.entities[0].category #=> String, one of "MEDICATION", "MEDICAL_CONDITION", "PROTECTED_HEALTH_INFORMATION", "TEST_TREATMENT_PROCEDURE", "ANATOMY"
|
315
|
+
# resp.entities[0].type #=> String, one of "NAME", "DOSAGE", "ROUTE_OR_MODE", "FORM", "FREQUENCY", "DURATION", "GENERIC_NAME", "BRAND_NAME", "STRENGTH", "RATE", "ACUITY", "TEST_NAME", "TEST_VALUE", "TEST_UNITS", "PROCEDURE_NAME", "TREATMENT_NAME", "DATE", "AGE", "CONTACT_POINT", "EMAIL", "IDENTIFIER", "URL", "ADDRESS", "PROFESSION", "SYSTEM_ORGAN_SITE", "DIRECTION", "QUALITY", "QUANTITY"
|
316
|
+
# resp.entities[0].traits #=> Array
|
317
|
+
# resp.entities[0].traits[0].name #=> String, one of "SIGN", "SYMPTOM", "DIAGNOSIS", "NEGATION"
|
318
|
+
# resp.entities[0].traits[0].score #=> Float
|
319
|
+
# resp.entities[0].attributes #=> Array
|
320
|
+
# resp.entities[0].attributes[0].type #=> String, one of "NAME", "DOSAGE", "ROUTE_OR_MODE", "FORM", "FREQUENCY", "DURATION", "GENERIC_NAME", "BRAND_NAME", "STRENGTH", "RATE", "ACUITY", "TEST_NAME", "TEST_VALUE", "TEST_UNITS", "PROCEDURE_NAME", "TREATMENT_NAME", "DATE", "AGE", "CONTACT_POINT", "EMAIL", "IDENTIFIER", "URL", "ADDRESS", "PROFESSION", "SYSTEM_ORGAN_SITE", "DIRECTION", "QUALITY", "QUANTITY"
|
321
|
+
# resp.entities[0].attributes[0].score #=> Float
|
322
|
+
# resp.entities[0].attributes[0].relationship_score #=> Float
|
323
|
+
# resp.entities[0].attributes[0].id #=> Integer
|
324
|
+
# resp.entities[0].attributes[0].begin_offset #=> Integer
|
325
|
+
# resp.entities[0].attributes[0].end_offset #=> Integer
|
326
|
+
# resp.entities[0].attributes[0].text #=> String
|
327
|
+
# resp.entities[0].attributes[0].traits #=> Array
|
328
|
+
# resp.entities[0].attributes[0].traits[0].name #=> String, one of "SIGN", "SYMPTOM", "DIAGNOSIS", "NEGATION"
|
329
|
+
# resp.entities[0].attributes[0].traits[0].score #=> Float
|
330
|
+
# resp.pagination_token #=> String
|
331
|
+
#
|
332
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectPHI AWS API Documentation
|
333
|
+
#
|
334
|
+
# @overload detect_phi(params = {})
|
335
|
+
# @param [Hash] params ({})
|
336
|
+
def detect_phi(params = {}, options = {})
|
337
|
+
req = build_request(:detect_phi, params)
|
338
|
+
req.send_request(options)
|
339
|
+
end
|
340
|
+
|
341
|
+
# @!endgroup
|
342
|
+
|
343
|
+
# @param params ({})
|
344
|
+
# @api private
|
345
|
+
def build_request(operation_name, params = {})
|
346
|
+
handlers = @handlers.for(operation_name)
|
347
|
+
context = Seahorse::Client::RequestContext.new(
|
348
|
+
operation_name: operation_name,
|
349
|
+
operation: config.api.operation(operation_name),
|
350
|
+
client: self,
|
351
|
+
params: params,
|
352
|
+
config: config)
|
353
|
+
context[:gem_name] = 'aws-sdk-comprehendmedical'
|
354
|
+
context[:gem_version] = '1.0.0'
|
355
|
+
Seahorse::Client::Request.new(handlers, context)
|
356
|
+
end
|
357
|
+
|
358
|
+
# @api private
|
359
|
+
# @deprecated
|
360
|
+
def waiter_names
|
361
|
+
[]
|
362
|
+
end
|
363
|
+
|
364
|
+
class << self
|
365
|
+
|
366
|
+
# @api private
|
367
|
+
attr_reader :identifier
|
368
|
+
|
369
|
+
# @api private
|
370
|
+
def errors_module
|
371
|
+
Errors
|
372
|
+
end
|
373
|
+
|
374
|
+
end
|
375
|
+
end
|
376
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::ComprehendMedical
|
9
|
+
# @api private
|
10
|
+
module ClientApi
|
11
|
+
|
12
|
+
include Seahorse::Model
|
13
|
+
|
14
|
+
Attribute = Shapes::StructureShape.new(name: 'Attribute')
|
15
|
+
AttributeList = Shapes::ListShape.new(name: 'AttributeList')
|
16
|
+
AttributeName = Shapes::StringShape.new(name: 'AttributeName')
|
17
|
+
BoundedLengthString = Shapes::StringShape.new(name: 'BoundedLengthString')
|
18
|
+
DetectEntitiesRequest = Shapes::StructureShape.new(name: 'DetectEntitiesRequest')
|
19
|
+
DetectEntitiesResponse = Shapes::StructureShape.new(name: 'DetectEntitiesResponse')
|
20
|
+
DetectPHIRequest = Shapes::StructureShape.new(name: 'DetectPHIRequest')
|
21
|
+
DetectPHIResponse = Shapes::StructureShape.new(name: 'DetectPHIResponse')
|
22
|
+
Entity = Shapes::StructureShape.new(name: 'Entity')
|
23
|
+
EntityList = Shapes::ListShape.new(name: 'EntityList')
|
24
|
+
EntitySubType = Shapes::StringShape.new(name: 'EntitySubType')
|
25
|
+
EntityType = Shapes::StringShape.new(name: 'EntityType')
|
26
|
+
Float = Shapes::FloatShape.new(name: 'Float')
|
27
|
+
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
28
|
+
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
29
|
+
InvalidEncodingException = Shapes::StructureShape.new(name: 'InvalidEncodingException')
|
30
|
+
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
31
|
+
ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
|
32
|
+
String = Shapes::StringShape.new(name: 'String')
|
33
|
+
TextSizeLimitExceededException = Shapes::StructureShape.new(name: 'TextSizeLimitExceededException')
|
34
|
+
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
35
|
+
Trait = Shapes::StructureShape.new(name: 'Trait')
|
36
|
+
TraitList = Shapes::ListShape.new(name: 'TraitList')
|
37
|
+
UnmappedAttribute = Shapes::StructureShape.new(name: 'UnmappedAttribute')
|
38
|
+
UnmappedAttributeList = Shapes::ListShape.new(name: 'UnmappedAttributeList')
|
39
|
+
|
40
|
+
Attribute.add_member(:type, Shapes::ShapeRef.new(shape: EntitySubType, location_name: "Type"))
|
41
|
+
Attribute.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
42
|
+
Attribute.add_member(:relationship_score, Shapes::ShapeRef.new(shape: Float, location_name: "RelationshipScore"))
|
43
|
+
Attribute.add_member(:id, Shapes::ShapeRef.new(shape: Integer, location_name: "Id"))
|
44
|
+
Attribute.add_member(:begin_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "BeginOffset"))
|
45
|
+
Attribute.add_member(:end_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "EndOffset"))
|
46
|
+
Attribute.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
47
|
+
Attribute.add_member(:traits, Shapes::ShapeRef.new(shape: TraitList, location_name: "Traits"))
|
48
|
+
Attribute.struct_class = Types::Attribute
|
49
|
+
|
50
|
+
AttributeList.member = Shapes::ShapeRef.new(shape: Attribute)
|
51
|
+
|
52
|
+
DetectEntitiesRequest.add_member(:text, Shapes::ShapeRef.new(shape: BoundedLengthString, required: true, location_name: "Text"))
|
53
|
+
DetectEntitiesRequest.struct_class = Types::DetectEntitiesRequest
|
54
|
+
|
55
|
+
DetectEntitiesResponse.add_member(:entities, Shapes::ShapeRef.new(shape: EntityList, required: true, location_name: "Entities"))
|
56
|
+
DetectEntitiesResponse.add_member(:unmapped_attributes, Shapes::ShapeRef.new(shape: UnmappedAttributeList, location_name: "UnmappedAttributes"))
|
57
|
+
DetectEntitiesResponse.add_member(:pagination_token, Shapes::ShapeRef.new(shape: String, location_name: "PaginationToken"))
|
58
|
+
DetectEntitiesResponse.struct_class = Types::DetectEntitiesResponse
|
59
|
+
|
60
|
+
DetectPHIRequest.add_member(:text, Shapes::ShapeRef.new(shape: BoundedLengthString, required: true, location_name: "Text"))
|
61
|
+
DetectPHIRequest.struct_class = Types::DetectPHIRequest
|
62
|
+
|
63
|
+
DetectPHIResponse.add_member(:entities, Shapes::ShapeRef.new(shape: EntityList, required: true, location_name: "Entities"))
|
64
|
+
DetectPHIResponse.add_member(:pagination_token, Shapes::ShapeRef.new(shape: String, location_name: "PaginationToken"))
|
65
|
+
DetectPHIResponse.struct_class = Types::DetectPHIResponse
|
66
|
+
|
67
|
+
Entity.add_member(:id, Shapes::ShapeRef.new(shape: Integer, location_name: "Id"))
|
68
|
+
Entity.add_member(:begin_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "BeginOffset"))
|
69
|
+
Entity.add_member(:end_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "EndOffset"))
|
70
|
+
Entity.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
71
|
+
Entity.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
72
|
+
Entity.add_member(:category, Shapes::ShapeRef.new(shape: EntityType, location_name: "Category"))
|
73
|
+
Entity.add_member(:type, Shapes::ShapeRef.new(shape: EntitySubType, location_name: "Type"))
|
74
|
+
Entity.add_member(:traits, Shapes::ShapeRef.new(shape: TraitList, location_name: "Traits"))
|
75
|
+
Entity.add_member(:attributes, Shapes::ShapeRef.new(shape: AttributeList, location_name: "Attributes"))
|
76
|
+
Entity.struct_class = Types::Entity
|
77
|
+
|
78
|
+
EntityList.member = Shapes::ShapeRef.new(shape: Entity)
|
79
|
+
|
80
|
+
Trait.add_member(:name, Shapes::ShapeRef.new(shape: AttributeName, location_name: "Name"))
|
81
|
+
Trait.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
|
82
|
+
Trait.struct_class = Types::Trait
|
83
|
+
|
84
|
+
TraitList.member = Shapes::ShapeRef.new(shape: Trait)
|
85
|
+
|
86
|
+
UnmappedAttribute.add_member(:type, Shapes::ShapeRef.new(shape: EntityType, location_name: "Type"))
|
87
|
+
UnmappedAttribute.add_member(:attribute, Shapes::ShapeRef.new(shape: Attribute, location_name: "Attribute"))
|
88
|
+
UnmappedAttribute.struct_class = Types::UnmappedAttribute
|
89
|
+
|
90
|
+
UnmappedAttributeList.member = Shapes::ShapeRef.new(shape: UnmappedAttribute)
|
91
|
+
|
92
|
+
|
93
|
+
# @api private
|
94
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
95
|
+
|
96
|
+
api.version = "2018-10-30"
|
97
|
+
|
98
|
+
api.metadata = {
|
99
|
+
"apiVersion" => "2018-10-30",
|
100
|
+
"endpointPrefix" => "comprehendmedical",
|
101
|
+
"jsonVersion" => "1.1",
|
102
|
+
"protocol" => "json",
|
103
|
+
"serviceAbbreviation" => "ComprehendMedical",
|
104
|
+
"serviceFullName" => "AWS Comprehend Medical",
|
105
|
+
"serviceId" => "ComprehendMedical",
|
106
|
+
"signatureVersion" => "v4",
|
107
|
+
"signingName" => "comprehendmedical",
|
108
|
+
"targetPrefix" => "ComprehendMedical_20181030",
|
109
|
+
"uid" => "comprehendmedical-2018-10-30",
|
110
|
+
}
|
111
|
+
|
112
|
+
api.add_operation(:detect_entities, Seahorse::Model::Operation.new.tap do |o|
|
113
|
+
o.name = "DetectEntities"
|
114
|
+
o.http_method = "POST"
|
115
|
+
o.http_request_uri = "/"
|
116
|
+
o.input = Shapes::ShapeRef.new(shape: DetectEntitiesRequest)
|
117
|
+
o.output = Shapes::ShapeRef.new(shape: DetectEntitiesResponse)
|
118
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
119
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
120
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
121
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
122
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidEncodingException)
|
123
|
+
o.errors << Shapes::ShapeRef.new(shape: TextSizeLimitExceededException)
|
124
|
+
end)
|
125
|
+
|
126
|
+
api.add_operation(:detect_phi, Seahorse::Model::Operation.new.tap do |o|
|
127
|
+
o.name = "DetectPHI"
|
128
|
+
o.http_method = "POST"
|
129
|
+
o.http_request_uri = "/"
|
130
|
+
o.input = Shapes::ShapeRef.new(shape: DetectPHIRequest)
|
131
|
+
o.output = Shapes::ShapeRef.new(shape: DetectPHIResponse)
|
132
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
133
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
|
134
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
135
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
136
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidEncodingException)
|
137
|
+
o.errors << Shapes::ShapeRef.new(shape: TextSizeLimitExceededException)
|
138
|
+
end)
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::ComprehendMedical
|
9
|
+
module Errors
|
10
|
+
|
11
|
+
extend Aws::Errors::DynamicErrors
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::ComprehendMedical
|
9
|
+
class Resource
|
10
|
+
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,263 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::ComprehendMedical
|
9
|
+
module Types
|
10
|
+
|
11
|
+
# An extracted segment of the text that is an attribute of an entity, or
|
12
|
+
# otherwise related to an entity, such as the dosage of a medication
|
13
|
+
# taken. It contains information about the attribute such as id, begin
|
14
|
+
# and end offset within the input text, and the segment of the input
|
15
|
+
# text.
|
16
|
+
#
|
17
|
+
# @!attribute [rw] type
|
18
|
+
# The type of attribute.
|
19
|
+
# @return [String]
|
20
|
+
#
|
21
|
+
# @!attribute [rw] score
|
22
|
+
# The level of confidence that Comprehend Medical has that the segment
|
23
|
+
# of text is correctly recognized as an attribute.
|
24
|
+
# @return [Float]
|
25
|
+
#
|
26
|
+
# @!attribute [rw] relationship_score
|
27
|
+
# The level of confidence that Comprehend Medical has that this
|
28
|
+
# attribute is correctly related to this entity.
|
29
|
+
# @return [Float]
|
30
|
+
#
|
31
|
+
# @!attribute [rw] id
|
32
|
+
# The numeric identifier for this attribute. This is a monotonically
|
33
|
+
# increasing id unique within this response rather than a global
|
34
|
+
# unique identifier.
|
35
|
+
# @return [Integer]
|
36
|
+
#
|
37
|
+
# @!attribute [rw] begin_offset
|
38
|
+
# The 0-based character offset in the input text that shows where the
|
39
|
+
# attribute begins. The offset returns the UTF-8 code point in the
|
40
|
+
# string.
|
41
|
+
# @return [Integer]
|
42
|
+
#
|
43
|
+
# @!attribute [rw] end_offset
|
44
|
+
# The 0-based character offset in the input text that shows where the
|
45
|
+
# attribute ends. The offset returns the UTF-8 code point in the
|
46
|
+
# string.
|
47
|
+
# @return [Integer]
|
48
|
+
#
|
49
|
+
# @!attribute [rw] text
|
50
|
+
# The segment of input text extracted as this attribute.
|
51
|
+
# @return [String]
|
52
|
+
#
|
53
|
+
# @!attribute [rw] traits
|
54
|
+
# Contextual information for this attribute.
|
55
|
+
# @return [Array<Types::Trait>]
|
56
|
+
#
|
57
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/Attribute AWS API Documentation
|
58
|
+
#
|
59
|
+
class Attribute < Struct.new(
|
60
|
+
:type,
|
61
|
+
:score,
|
62
|
+
:relationship_score,
|
63
|
+
:id,
|
64
|
+
:begin_offset,
|
65
|
+
:end_offset,
|
66
|
+
:text,
|
67
|
+
:traits)
|
68
|
+
include Aws::Structure
|
69
|
+
end
|
70
|
+
|
71
|
+
# @note When making an API call, you may pass DetectEntitiesRequest
|
72
|
+
# data as a hash:
|
73
|
+
#
|
74
|
+
# {
|
75
|
+
# text: "BoundedLengthString", # required
|
76
|
+
# }
|
77
|
+
#
|
78
|
+
# @!attribute [rw] text
|
79
|
+
# A UTF-8 text string containing the clinical content being examined
|
80
|
+
# for entities. Each string must contain fewer than 20,000 bytes of
|
81
|
+
# characters.
|
82
|
+
# @return [String]
|
83
|
+
#
|
84
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectEntitiesRequest AWS API Documentation
|
85
|
+
#
|
86
|
+
class DetectEntitiesRequest < Struct.new(
|
87
|
+
:text)
|
88
|
+
include Aws::Structure
|
89
|
+
end
|
90
|
+
|
91
|
+
# @!attribute [rw] entities
|
92
|
+
# The collection of medical entities extracted from the input text and
|
93
|
+
# their associated information. For each entity, the response provides
|
94
|
+
# the entity text, the entity category, where the entity text begins
|
95
|
+
# and ends, and the level of confidence that Comprehend Medical has in
|
96
|
+
# the detection and analysis. Attributes and traits of the entity are
|
97
|
+
# also returned.
|
98
|
+
# @return [Array<Types::Entity>]
|
99
|
+
#
|
100
|
+
# @!attribute [rw] unmapped_attributes
|
101
|
+
# Attributes extracted from the input text that we were unable to
|
102
|
+
# relate to an entity.
|
103
|
+
# @return [Array<Types::UnmappedAttribute>]
|
104
|
+
#
|
105
|
+
# @!attribute [rw] pagination_token
|
106
|
+
# If the result of the previous request to DetectEntities was
|
107
|
+
# truncated, include the Paginationtoken to fetch the next page of
|
108
|
+
# entities.
|
109
|
+
# @return [String]
|
110
|
+
#
|
111
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectEntitiesResponse AWS API Documentation
|
112
|
+
#
|
113
|
+
class DetectEntitiesResponse < Struct.new(
|
114
|
+
:entities,
|
115
|
+
:unmapped_attributes,
|
116
|
+
:pagination_token)
|
117
|
+
include Aws::Structure
|
118
|
+
end
|
119
|
+
|
120
|
+
# @note When making an API call, you may pass DetectPHIRequest
|
121
|
+
# data as a hash:
|
122
|
+
#
|
123
|
+
# {
|
124
|
+
# text: "BoundedLengthString", # required
|
125
|
+
# }
|
126
|
+
#
|
127
|
+
# @!attribute [rw] text
|
128
|
+
# A UTF-8 text string containing the clinical content being examined
|
129
|
+
# for PHI entities. Each string must contain fewer than 20,000 bytes
|
130
|
+
# of characters.
|
131
|
+
# @return [String]
|
132
|
+
#
|
133
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectPHIRequest AWS API Documentation
|
134
|
+
#
|
135
|
+
class DetectPHIRequest < Struct.new(
|
136
|
+
:text)
|
137
|
+
include Aws::Structure
|
138
|
+
end
|
139
|
+
|
140
|
+
# @!attribute [rw] entities
|
141
|
+
# The collection of PHI entities extracted from the input text and
|
142
|
+
# their associated information. For each entity, the response provides
|
143
|
+
# the entity text, the entity category, where the entity text begins
|
144
|
+
# and ends, and the level of confidence that Comprehend Medical has in
|
145
|
+
# its detection.
|
146
|
+
# @return [Array<Types::Entity>]
|
147
|
+
#
|
148
|
+
# @!attribute [rw] pagination_token
|
149
|
+
# If the result of the previous request to DetectPHI was truncated,
|
150
|
+
# include the Paginationtoken to fetch the next page of PHI entities.
|
151
|
+
# @return [String]
|
152
|
+
#
|
153
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/DetectPHIResponse AWS API Documentation
|
154
|
+
#
|
155
|
+
class DetectPHIResponse < Struct.new(
|
156
|
+
:entities,
|
157
|
+
:pagination_token)
|
158
|
+
include Aws::Structure
|
159
|
+
end
|
160
|
+
|
161
|
+
# Provides information about an extracted medical entity.
|
162
|
+
#
|
163
|
+
# @!attribute [rw] id
|
164
|
+
# The numeric identifier for the entity. This is a monotonically
|
165
|
+
# increasing id unique within this response rather than a global
|
166
|
+
# unique identifier.
|
167
|
+
# @return [Integer]
|
168
|
+
#
|
169
|
+
# @!attribute [rw] begin_offset
|
170
|
+
# The 0-based character offset in the input text that shows where the
|
171
|
+
# entity begins. The offset returns the UTF-8 code point in the
|
172
|
+
# string.
|
173
|
+
# @return [Integer]
|
174
|
+
#
|
175
|
+
# @!attribute [rw] end_offset
|
176
|
+
# The 0-based character offset in the input text that shows where the
|
177
|
+
# entity ends. The offset returns the UTF-8 code point in the string.
|
178
|
+
# @return [Integer]
|
179
|
+
#
|
180
|
+
# @!attribute [rw] score
|
181
|
+
# The level of confidence that Comprehend Medical has in the accuracy
|
182
|
+
# of the detection.
|
183
|
+
# @return [Float]
|
184
|
+
#
|
185
|
+
# @!attribute [rw] text
|
186
|
+
# The segment of input text extracted as this entity.
|
187
|
+
# @return [String]
|
188
|
+
#
|
189
|
+
# @!attribute [rw] category
|
190
|
+
# The category of the entity.
|
191
|
+
# @return [String]
|
192
|
+
#
|
193
|
+
# @!attribute [rw] type
|
194
|
+
# Describes the specific type of entity with category of entities.
|
195
|
+
# @return [String]
|
196
|
+
#
|
197
|
+
# @!attribute [rw] traits
|
198
|
+
# Contextual information for the entity
|
199
|
+
# @return [Array<Types::Trait>]
|
200
|
+
#
|
201
|
+
# @!attribute [rw] attributes
|
202
|
+
# The extracted attributes that relate to this entity.
|
203
|
+
# @return [Array<Types::Attribute>]
|
204
|
+
#
|
205
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/Entity AWS API Documentation
|
206
|
+
#
|
207
|
+
class Entity < Struct.new(
|
208
|
+
:id,
|
209
|
+
:begin_offset,
|
210
|
+
:end_offset,
|
211
|
+
:score,
|
212
|
+
:text,
|
213
|
+
:category,
|
214
|
+
:type,
|
215
|
+
:traits,
|
216
|
+
:attributes)
|
217
|
+
include Aws::Structure
|
218
|
+
end
|
219
|
+
|
220
|
+
# Provides contextual information about the extracted entity.
|
221
|
+
#
|
222
|
+
# @!attribute [rw] name
|
223
|
+
# Provides a name or contextual description about the trait.
|
224
|
+
# @return [String]
|
225
|
+
#
|
226
|
+
# @!attribute [rw] score
|
227
|
+
# The level of confidence that Comprehend Medical has in the accuracy
|
228
|
+
# of this trait.
|
229
|
+
# @return [Float]
|
230
|
+
#
|
231
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/Trait AWS API Documentation
|
232
|
+
#
|
233
|
+
class Trait < Struct.new(
|
234
|
+
:name,
|
235
|
+
:score)
|
236
|
+
include Aws::Structure
|
237
|
+
end
|
238
|
+
|
239
|
+
# An attribute that we extracted, but were unable to relate to an
|
240
|
+
# entity.
|
241
|
+
#
|
242
|
+
# @!attribute [rw] type
|
243
|
+
# The type of the attribute, could be one of the following values:
|
244
|
+
# "MEDICATION", "MEDICAL\_CONDITION", "ANATOMY",
|
245
|
+
# "TEST\_AND\_TREATMENT\_PROCEDURE" or
|
246
|
+
# "PERSONAL\_HEALTH\_INFORMATION".
|
247
|
+
# @return [String]
|
248
|
+
#
|
249
|
+
# @!attribute [rw] attribute
|
250
|
+
# The specific attribute that has been extracted but not mapped to an
|
251
|
+
# entity.
|
252
|
+
# @return [Types::Attribute]
|
253
|
+
#
|
254
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/comprehendmedical-2018-10-30/UnmappedAttribute AWS API Documentation
|
255
|
+
#
|
256
|
+
class UnmappedAttribute < Struct.new(
|
257
|
+
:type,
|
258
|
+
:attribute)
|
259
|
+
include Aws::Structure
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|
263
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-comprehendmedical
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.39.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.39.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: aws-sigv4
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.0'
|
47
|
+
description: Official AWS Ruby gem for AWS Comprehend Medical (ComprehendMedical).
|
48
|
+
This gem is part of the AWS SDK for Ruby.
|
49
|
+
email:
|
50
|
+
- trevrowe@amazon.com
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- lib/aws-sdk-comprehendmedical.rb
|
56
|
+
- lib/aws-sdk-comprehendmedical/client.rb
|
57
|
+
- lib/aws-sdk-comprehendmedical/client_api.rb
|
58
|
+
- lib/aws-sdk-comprehendmedical/customizations.rb
|
59
|
+
- lib/aws-sdk-comprehendmedical/errors.rb
|
60
|
+
- lib/aws-sdk-comprehendmedical/resource.rb
|
61
|
+
- lib/aws-sdk-comprehendmedical/types.rb
|
62
|
+
homepage: http://github.com/aws/aws-sdk-ruby
|
63
|
+
licenses:
|
64
|
+
- Apache-2.0
|
65
|
+
metadata:
|
66
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-comprehendmedical
|
67
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-comprehendmedical/CHANGELOG.md
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 2.5.2.3
|
85
|
+
signing_key:
|
86
|
+
specification_version: 4
|
87
|
+
summary: AWS SDK for Ruby - ComprehendMedical
|
88
|
+
test_files: []
|