UNPKG

8.67 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class ComprehendMedical extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: ComprehendMedical.Types.ClientConfiguration)
13 config: Config & ComprehendMedical.Types.ClientConfiguration;
14 /**
15 * 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 .
16 */
17 detectEntities(params: ComprehendMedical.Types.DetectEntitiesRequest, callback?: (err: AWSError, data: ComprehendMedical.Types.DetectEntitiesResponse) => void): Request<ComprehendMedical.Types.DetectEntitiesResponse, AWSError>;
18 /**
19 * 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 .
20 */
21 detectEntities(callback?: (err: AWSError, data: ComprehendMedical.Types.DetectEntitiesResponse) => void): Request<ComprehendMedical.Types.DetectEntitiesResponse, AWSError>;
22 /**
23 * Inspects the clinical text for personal health information (PHI) entities and entity category, location, and confidence score on that information.
24 */
25 detectPHI(params: ComprehendMedical.Types.DetectPHIRequest, callback?: (err: AWSError, data: ComprehendMedical.Types.DetectPHIResponse) => void): Request<ComprehendMedical.Types.DetectPHIResponse, AWSError>;
26 /**
27 * Inspects the clinical text for personal health information (PHI) entities and entity category, location, and confidence score on that information.
28 */
29 detectPHI(callback?: (err: AWSError, data: ComprehendMedical.Types.DetectPHIResponse) => void): Request<ComprehendMedical.Types.DetectPHIResponse, AWSError>;
30}
31declare namespace ComprehendMedical {
32 export interface Attribute {
33 /**
34 * The type of attribute.
35 */
36 Type?: EntitySubType;
37 /**
38 * The level of confidence that Comprehend Medical has that the segment of text is correctly recognized as an attribute.
39 */
40 Score?: Float;
41 /**
42 * The level of confidence that Comprehend Medical has that this attribute is correctly related to this entity.
43 */
44 RelationshipScore?: Float;
45 /**
46 * The numeric identifier for this attribute. This is a monotonically increasing id unique within this response rather than a global unique identifier.
47 */
48 Id?: Integer;
49 /**
50 * 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.
51 */
52 BeginOffset?: Integer;
53 /**
54 * 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.
55 */
56 EndOffset?: Integer;
57 /**
58 * The segment of input text extracted as this attribute.
59 */
60 Text?: String;
61 /**
62 * Contextual information for this attribute.
63 */
64 Traits?: TraitList;
65 }
66 export type AttributeList = Attribute[];
67 export type AttributeName = "SIGN"|"SYMPTOM"|"DIAGNOSIS"|"NEGATION"|string;
68 export type BoundedLengthString = string;
69 export interface DetectEntitiesRequest {
70 /**
71 * A UTF-8 text string containing the clinical content being examined for entities. Each string must contain fewer than 20,000 bytes of characters.
72 */
73 Text: BoundedLengthString;
74 }
75 export interface DetectEntitiesResponse {
76 /**
77 * 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.
78 */
79 Entities: EntityList;
80 /**
81 * Attributes extracted from the input text that we were unable to relate to an entity.
82 */
83 UnmappedAttributes?: UnmappedAttributeList;
84 /**
85 * If the result of the previous request to DetectEntities was truncated, include the Paginationtoken to fetch the next page of entities.
86 */
87 PaginationToken?: String;
88 }
89 export interface DetectPHIRequest {
90 /**
91 * 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.
92 */
93 Text: BoundedLengthString;
94 }
95 export interface DetectPHIResponse {
96 /**
97 * 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.
98 */
99 Entities: EntityList;
100 /**
101 * If the result of the previous request to DetectPHI was truncated, include the Paginationtoken to fetch the next page of PHI entities.
102 */
103 PaginationToken?: String;
104 }
105 export interface Entity {
106 /**
107 * The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.
108 */
109 Id?: Integer;
110 /**
111 * 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.
112 */
113 BeginOffset?: Integer;
114 /**
115 * 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.
116 */
117 EndOffset?: Integer;
118 /**
119 * The level of confidence that Comprehend Medical has in the accuracy of the detection.
120 */
121 Score?: Float;
122 /**
123 * The segment of input text extracted as this entity.
124 */
125 Text?: String;
126 /**
127 * The category of the entity.
128 */
129 Category?: EntityType;
130 /**
131 * Describes the specific type of entity with category of entities.
132 */
133 Type?: EntitySubType;
134 /**
135 * Contextual information for the entity
136 */
137 Traits?: TraitList;
138 /**
139 * The extracted attributes that relate to this entity.
140 */
141 Attributes?: AttributeList;
142 }
143 export type EntityList = Entity[];
144 export type EntitySubType = "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"|string;
145 export type EntityType = "MEDICATION"|"MEDICAL_CONDITION"|"PROTECTED_HEALTH_INFORMATION"|"TEST_TREATMENT_PROCEDURE"|"ANATOMY"|string;
146 export type Float = number;
147 export type Integer = number;
148 export type String = string;
149 export interface Trait {
150 /**
151 * Provides a name or contextual description about the trait.
152 */
153 Name?: AttributeName;
154 /**
155 * The level of confidence that Comprehend Medical has in the accuracy of this trait.
156 */
157 Score?: Float;
158 }
159 export type TraitList = Trait[];
160 export interface UnmappedAttribute {
161 /**
162 * The type of the attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PERSONAL_HEALTH_INFORMATION".
163 */
164 Type?: EntityType;
165 /**
166 * The specific attribute that has been extracted but not mapped to an entity.
167 */
168 Attribute?: Attribute;
169 }
170 export type UnmappedAttributeList = UnmappedAttribute[];
171 /**
172 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
173 */
174 export type apiVersion = "2018-10-30"|"latest"|string;
175 export interface ClientApiVersions {
176 /**
177 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
178 */
179 apiVersion?: apiVersion;
180 }
181 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
182 /**
183 * Contains interfaces for use with the ComprehendMedical client.
184 */
185 export import Types = ComprehendMedical;
186}
187export = ComprehendMedical;